64 Commits

Author SHA1 Message Date
Victor Berchet
2f14415836 fix(compiler): updates hash algo for xmb/xtb files 2016-11-14 12:55:48 -08:00
Victor Berchet
76e4911e8b fix(core): fix placeholders handling in i18n.
Prior to this commit, translations were built in the serializers. This
could not work as a single translation can be used for different source
messages having different placeholder content.

Serializers do not try to replace the placeholders any more.
Placeholders are replaced by the translation bundle and the source
message is given as parameter so that the content of the placeholders is
taken into account.

Also XMB ids are now independent of the expression which is replaced by
a placeholder in the extracted file.
fixes #12512
2016-11-14 12:55:48 -08:00
Victor Berchet
ed5e98d0df fix(core): misc i18n fixes 2016-11-14 12:55:48 -08:00
Victor Berchet
146af1fed9 refactor(core): simplify i18n serializers code 2016-11-14 12:55:48 -08:00
Victor Berchet
c60ba7a72f refactor(core): remove ListWrapper from i18n 2016-11-14 12:55:48 -08:00
Victor Berchet
08c038ebd9 fix(core): xmb serializer uses decimal messaged IDs
fixes #12511
2016-11-14 12:55:48 -08:00
Victor Berchet
582550a90d feat(core): implements a decimal fingerprint for i18n 2016-11-14 12:55:48 -08:00
Joao Dias
77ee27c59e refactor(): use const and let instead of var 2016-11-12 16:40:17 -08:00
Victor Berchet
040bf57966 fix(xlif): fix <x> ctype names
fixes #12000
see http://docs.oasis-open.org/xliff/v1.2/os/xliff-core.html#ctype
2016-09-30 17:59:43 -07:00
Victor Berchet
65a60b7456 style(I18N): Carriage returns in serialized files 2016-09-30 17:59:43 -07:00
Miško Hevery
979657989b fix(packages): use ES modules for primary build (#11120) 2016-08-30 18:07:40 -07:00
Victor Berchet
f6a7d6504c feat(i18n): xliff integration 2016-08-15 22:28:38 -07:00
Victor Berchet
96bf42261b fix(XmlHelper): declaration 2016-08-15 22:21:40 -07:00
Victor Berchet
72bb38f83b feat(i18n): xliff 2016-08-15 22:21:40 -07:00
Matias Niemelä
6580d67875 feat(i18n): pass translation config directly into ngc (#10622) 2016-08-12 14:45:36 -07:00
Victor Berchet
39c0f9ebb3 fix(ExtractorMerger): returns errors together with nodes (as a ParseTreeResult) 2016-08-11 23:24:22 -07:00
Victor Berchet
91dd672aa4 style(xmb): add a space after ICU message cases 2016-08-11 23:24:22 -07:00
Victor Berchet
50345b8c36 feat(i18n): add an HtmlParser decorator (#10645)
* fix(i18n): merge retains attributes w/o value

* feat(i18n): allow attributes on ng-container (i.e. i18n)

* feat(i18n): add an HtmlParser decorator

* style: clang format
2016-08-11 21:00:35 -07:00
Victor Berchet
43512aa5eb fix(i18n): ICU placeholders are replaced by their translations (#10586)
They were replaced by the original message.
2016-08-09 21:05:04 -07:00
Victor Berchet
b65f66feff feat(i18n): switch to sha1 for message fingerprinting 2016-08-09 09:52:11 -07:00
Victor Berchet
dd68ae3ef1 feat(ExtractorMerger): ignore implicit tags in translatable sections 2016-08-09 09:52:11 -07:00
Victor Berchet
1b04d70626 feat(ExtractorMerger): allow nested implicit tags 2016-08-09 09:52:11 -07:00
Victor Berchet
74b57dfa7d refactor(i18n): remove circular dep 2016-08-05 13:39:54 -07:00
Victor Berchet
8c9c0986e9 refatcor(digestMessage): takes a i18n.Message 2016-08-05 13:39:54 -07:00
Victor Berchet
4028fcaa51 refactor(i18n): Drop html.Message and create i18n.Message right away 2016-08-05 13:39:54 -07:00
Victor Berchet
7a8ef1eae5 feat(i18n): merge translations 2016-08-05 13:39:54 -07:00
Victor Berchet
e811a5d97f refactor(i18n): misc updates 2016-08-05 13:39:54 -07:00
Victor Berchet
df44e3e425 fix(i18n extractor): array manipulation 2016-08-05 13:39:54 -07:00
Victor Berchet
cdb1a237e5 refactor(compiler): html_parser -> ml_parser 2016-08-05 13:39:54 -07:00
Marc Laval
cd18de7a21 refactor(compiler): use Object.keys instead of Object.getOwnPropertyNames (#10498) 2016-08-04 10:35:41 -07:00
Victor Berchet
13c8211065 fix: String.split(str, n) stops after n separator (#10408) 2016-08-01 11:33:35 -07:00
Victor Berchet
e34a04d2ad feat(xmb/xtb): support dtd 2016-07-29 14:18:34 -07:00
Victor Berchet
3e2900f74b refactor(i18n): move code around 2016-07-29 13:40:58 -07:00
Victor Berchet
0eee1d5de3 feat(i18n): xtb serializer 2016-07-29 13:40:58 -07:00
Victor Berchet
1b77604ee2 refactor(compiler): re-arrange files 2016-07-29 13:40:58 -07:00
Victor Berchet
cc5cfe87c3 feat(i18n): xmb serializer 2016-07-29 13:40:58 -07:00
Victor Berchet
48f230a951 feat(I18nAst): introduce an intermediate AST 2016-07-29 13:40:58 -07:00
Victor Berchet
2be50bdbb0 refactor(i18n): message extractor
fixes #8802
2016-07-29 13:40:58 -07:00
Victor Berchet
28e8b2faab feat(ICU): extract ICU messages 2016-07-29 13:40:58 -07:00
Victor Berchet
0ccb6e0dfc refactor: code cleanup 2016-07-12 16:57:39 -07:00
Victor Berchet
3050ae155c feat(ICU): enable ICU extraction even when when in is not used
BREAKING CHANGES:

"{" is used a a delimiter for ICU messages then it could not be used in text nodes.
"{" should be escaped as "{{ '{' }}"

Before:

    <span>some { valid } text</span>

After:

    <span>some { invalid } text<span> <!-- throw parse error -->
    <span>some {{ '{' }} valid } text</span>
2016-07-12 16:57:39 -07:00
Victor Berchet
402fd934d0 refactor: code cleanup 2016-07-12 15:26:03 -07:00
Victor Berchet
60e6f91a53 refactor(HmtlLexer): cleanup 2016-07-12 15:26:03 -07:00
Victor Berchet
25e070dd65 fix(HtmlParser): correctly propagate the interpolation config across layers 2016-07-12 15:26:03 -07:00
ScottSWu
ae75e3640a chore(lint): Added license headers to most TypeScript files
Relates to #9380
2016-06-23 09:47:54 -07:00
Victor Berchet
c9c81e1fbc fix(XmbSerializer): add meaning attribute, escape attribute values 2016-06-21 11:52:11 -07:00
Victor Berchet
e38e04c1c2 refactor(MessageExtractor): pass the interpolationConfig around 2016-06-21 11:52:11 -07:00
Victor Berchet
99587ea4ed refactor(i18n): misc 2016-06-21 11:52:11 -07:00
Victor Berchet
58b18d7fe7 fix(partition): fix partition when <!-- i18n --> is the only child 2016-06-21 11:52:11 -07:00
Victor Berchet
04a50f5832 feat(MessageExtractor): do not expand ICU messages before extraction 2016-06-21 11:52:11 -07:00