| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // A helper function for using JsTemplate. See jstemplate_builder.h for more | 5 // A helper function for using JsTemplate. See jstemplate_builder.h for more |
| 6 // info. | 6 // info. |
| 7 | 7 |
| 8 #include "chrome/common/jstemplate_builder.h" | 8 #include "chrome/common/jstemplate_builder.h" |
| 9 | 9 |
| 10 #include "app/resource_bundle.h" | 10 #include "app/resource_bundle.h" |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 return; | 101 return; |
| 102 } | 102 } |
| 103 | 103 |
| 104 output->append("<script>"); | 104 output->append("<script>"); |
| 105 output->append(i18n_template_src.data(), i18n_template_src.size()); | 105 output->append(i18n_template_src.data(), i18n_template_src.size()); |
| 106 output->append("</script>"); | 106 output->append("</script>"); |
| 107 } | 107 } |
| 108 | 108 |
| 109 void AppendI18nTemplateProcessHtml(std::string* output) { | 109 void AppendI18nTemplateProcessHtml(std::string* output) { |
| 110 output->append("<script>"); | 110 output->append("<script>"); |
| 111 output->append("i18nTemplate.process(document.documentElement, "); | 111 output->append("i18nTemplate.process(document, "); |
| 112 output->append("templateData);"); | 112 output->append("templateData);"); |
| 113 output->append("</script>"); | 113 output->append("</script>"); |
| 114 } | 114 } |
| 115 | 115 |
| 116 } // namespace jstemplate_builder | 116 } // namespace jstemplate_builder |
| OLD | NEW |