Skip to content

[Feature][i18n] .xmb/.xtb support #9067

Closed

Description

@vicb

Translation messages are extracted to .xmb files (message bundle)

Translated messaged are then loaded from .xtb files (translation bundles)

  • we don't have currently have support for loading .xtb files
  • plural messages are not extracted correctly (should be a single msg in ICU format)
  • meaning is not serialized to xmbs

More info (ex in TCCH)

Escaped characters in source code
Source code specific escaped characters should be converted to plain text (unescaped) when generating the message bundle (xmb file).
They can’’t do it → They can’t do it
%% → %
\u2026 → … (Unicode horizontal ellipsis)
Plain text (unescaped) characters in the translation bundle (xtb file) should be converted to source code specific syntax when generating the localized code.
They can’t do it → They can’’t do it
% → %%
… → \u2026

Special characters in the generated XMB
There are 5 characters that need to be escaped in the xmb file:
Symbols: quot amp apos lt gt
If these characters are in message text, then the handler must escape them.

Placeholder names
The placeholder name must be in ALL CAPS and use only letters, numbers, and the underscore character.

If you use a placeholder for an opening HTML tag, you should use a comparable placeholder for the closing tag, and they should share a name (e.g., "BEGIN_BOLD" and "END_BOLD").
If you have two placeholders in the same message, one can't be a substring of another. That is, "PHONE_NUMBER" and "WORK_PHONE_NUMBER" aren't allowed together; use "HOME_PHONE_NUMBER" and "WORK_PHONE_NUMBER" instead.
If you have a placeholder named ABC, then the text "ABC" is not allowed to be anywhere in the message, even as a substring.

Activity

  1. self-assigned this
    on Jun 7, 2016
  2. added
    area: i18nIssues related to localization and internationalization
    on Jun 7, 2016
  3. changed the title [-][Feature][i18n] .xtb file loader[/-] [+][Feature][i18n] .xmb/.xtb support[/+] on Jun 9, 2016
  4. manekinekko commented on Jun 12, 2016

    @manekinekko
    Contributor

    Note: For more details about .xmb/xtb files, read this: http://cldr.unicode.org/development/development-process/design-proposals/xmb

  5. vicb commented on Aug 4, 2016

    @vicb
    ContributorAuthor

    Merged

  6. angular-automatic-lock-bot commented on Sep 9, 2019

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  7. locked and limited conversation to collaborators on Sep 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area: i18nIssues related to localization and internationalization

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions