Skip to content

Commit

Permalink
Merge pull request #4927 from cb1kenobi/timob-15628
Browse files Browse the repository at this point in the history
[TIMOB-15628] Set formatted false on all strings in i18n strings.xml files.
  • Loading branch information
ayeung committed Nov 8, 2013
2 parents b7f7293 + f4a0fe4 commit 8e26b79
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion android/cli/commands/_build.js
Original file line number Diff line number Diff line change
Expand Up @@ -2789,6 +2789,9 @@ AndroidBuilder.prototype.writeXmlFile = function writeXmlFile(srcOrDoc, dest) {
xml.forEachElement(srcDoc, byName);
Object.keys(nodes).forEach(function (name) {
root.appendChild(dom.createTextNode('\n\t'));
if (filename == 'strings.xml') {
nodes[name].setAttribute('formatted', 'false');
}
root.appendChild(nodes[name]);
});
break;
Expand Down Expand Up @@ -2878,6 +2881,7 @@ AndroidBuilder.prototype.generateI18N = function generateI18N(next) {
appnameNode = dom.createElement('string');

appnameNode.setAttribute('name', 'app_name');
appnameNode.setAttribute('formatted', 'false');
appnameNode.appendChild(dom.createTextNode(appname));
root.appendChild(dom.createTextNode('\n\t'));
root.appendChild(appnameNode);
Expand All @@ -2886,7 +2890,8 @@ AndroidBuilder.prototype.generateI18N = function generateI18N(next) {
if (name != 'appname') {
var node = dom.createElement('string');
node.setAttribute('name', name);
node.appendChild(dom.createTextNode(data[locale].strings[name].replace(/\\?'/g, '\\')));
node.setAttribute('formatted', 'false');
node.appendChild(dom.createTextNode(data[locale].strings[name].replace(/\\?'/g, "\\'")));
root.appendChild(dom.createTextNode('\n\t'));
root.appendChild(node);
}
Expand Down

0 comments on commit 8e26b79

Please sign in to comment.