Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(250)

Side by Side Diff: test/message_extraction/make_hardcoded_translation.dart

Issue 1151133002: Allow spaces between the identifier and the translation when parsing ARB files (Closed) Base URL: https://github.com/dart-lang/intl.git@master
Patch Set: Make it 0.12.4 Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « pubspec.yaml ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env dart 1 #!/usr/bin/env dart
2 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 2 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
3 // for details. All rights reserved. Use of this source code is governed by a 3 // for details. All rights reserved. Use of this source code is governed by a
4 // BSD-style license that can be found in the LICENSE file. 4 // BSD-style license that can be found in the LICENSE file.
5 5
6 /** 6 /**
7 * This simulates a translation process, reading the messages generated 7 * This simulates a translation process, reading the messages generated
8 * from extract_message.dart for the files sample_with_messages.dart and 8 * from extract_message.dart for the files sample_with_messages.dart and
9 * part_of_sample_with_messages.dart and writing out hard-coded translations for 9 * part_of_sample_with_messages.dart and writing out hard-coded translations for
10 * German and French locales. 10 * German and French locales.
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 "}" 55 "}"
56 "}" 56 "}"
57 "female{" 57 "female{"
58 "{number,plural, " 58 "{number,plural, "
59 "=1{{names} était allée à la {place}}" 59 "=1{{names} était allée à la {place}}"
60 "other{{names} étaient allées à la {place}}" 60 "other{{names} étaient allées à la {place}}"
61 "}" 61 "}"
62 "}" 62 "}"
63 "}", 63 "}",
64 "outerPlural": "{n,plural, =0{rien}=1{un}other{quelques-uns}}", 64 "outerPlural": "{n,plural, =0{rien}=1{un}other{quelques-uns}}",
65 "outerGender": "{g,select, male{homme}female{femme}other{autre}}", 65 "outerGender": "{g,select, male {homme} female {femme} other {autre}}",
66 "pluralThatFailsParsing": "{noOfThings,plural, " 66 "pluralThatFailsParsing": "{noOfThings,plural, "
67 "=1{1 chose:}other{{noOfThings} choses:}}", 67 "=1{1 chose:}other{{noOfThings} choses:}}",
68 "nestedOuter": "{number,plural, other{" 68 "nestedOuter": "{number,plural, other{"
69 "{gen,select, male{{number} homme}other{{number} autre}}}}", 69 "{gen,select, male{{number} homme}other{{number} autre}}}}",
70 "outerSelect": "{currency,select, CDN{{amount} dollars Canadiens}" 70 "outerSelect": "{currency,select, CDN{{amount} dollars Canadiens}"
71 "other{{amount} certaine devise ou autre.}}}", 71 "other{{amount} certaine devise ou autre.}}}",
72 "nestedSelect": "{currency,select, CDN{{amount,plural, " 72 "nestedSelect": "{currency,select, CDN{{amount,plural, "
73 "=1{{amount} dollar Canadien}" 73 "=1{{amount} dollar Canadien}"
74 "other{{amount} dollars Canadiens}}}" 74 "other{{amount} dollars Canadiens}}}"
75 "other{N'importe quoi}" 75 "other{N'importe quoi}"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 parser.addOption("output-dir", 161 parser.addOption("output-dir",
162 defaultsTo: '.', callback: (value) => targetDir = value); 162 defaultsTo: '.', callback: (value) => targetDir = value);
163 parser.parse(args); 163 parser.parse(args);
164 164
165 var fileArgs = args.where((x) => x.contains('.arb')); 165 var fileArgs = args.where((x) => x.contains('.arb'));
166 166
167 var messages = JSON.decode(new File(fileArgs.first).readAsStringSync()); 167 var messages = JSON.decode(new File(fileArgs.first).readAsStringSync());
168 translate(messages, "fr", french); 168 translate(messages, "fr", french);
169 translate(messages, "de_DE", german); 169 translate(messages, "de_DE", german);
170 } 170 }
OLDNEW
« no previous file with comments | « pubspec.yaml ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698