You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bundle does not work properly with new Intl ICU translations (#452)
* Remove both "normal" and ICU domain from messages set
#300
* Add new configuration for new message format
It will allow us to control if we want to use new ICU format (with
suffixed domain with "+intl-icu") or format.
Configuration has normalizer (making sure string is in lower case) and
validator (making sure it's a string and either "" or "icu").
Setting `new_message_format: ""` we'll end up with new translations in
container like: {domain}.{locale}.{ext}.
Setting `new_message_format: "icu"` we'll end up with new translations
in container like: {domain}+intl-icu.{locale}.{ext}.
#300
* Add new field and getter based on recently added new config option
#300
* Make sure importer is ICU format aware
Add new argument to converter methods to make sure we're able to
recognize existing translations (and use correct domain - either
standard or ICU format).
In case translation is new we're going to use predefined format (using
new configuration option new_message_format).
#300
* Make sure new_message_format configuration is defined
Let the default configuration overlap with Symfony configuration option
default value.
#300
* Pass to converter new_message_format configuration
#300
* Make sure importer is aware of ICU domain format
Because of MessageCatalogue interface limitation we're using NSA to
access raw messages data.
Additionally because defines() method uses isset() were force to check
raw messages data directly to check if key exits (translations from
source collection are all set to NULL).
#300
* Let code "breath" a bit
#300
* Make sure we're always aware of ICU domain
#300
* Make sure we're aware of 3 different message domains
We have:
1. Source message domain.
2. Target message domain.
3. Result message domain (this is tied to 2 of the above).
This solution assumes we'd always like to use ICU format (result message
domain) if we use it in any of source or target catalogue.
Additionally because of default NULL values in source catalogue
(internal extractor design to set NULL for "target" when creating
messages catalogue from source collection) we have to check if desired
catalogue's messages field has a key (within requested domain) or not.
Using MessageCatalogue::defines() would return false for catalogue
without translation (NULL value).
Lastly - make sure internal messages field utilised result message
domain for consistency with result field.
#300
* Persist PHP CS Fixer changes
#300
* Remove both "normal" and ICU domain from messages set
#300
* Add new configuration for new message format
It will allow us to control if we want to use new ICU format (with
suffixed domain with "+intl-icu") or format.
Configuration has normalizer (making sure string is in lower case) and
validator (making sure it's a string and either "" or "icu").
Setting `new_message_format: ""` we'll end up with new translations in
container like: {domain}.{locale}.{ext}.
Setting `new_message_format: "icu"` we'll end up with new translations
in container like: {domain}+intl-icu.{locale}.{ext}.
#300
* Add new field and getter based on recently added new config option
#300
* Make sure importer is ICU format aware
Add new argument to converter methods to make sure we're able to
recognize existing translations (and use correct domain - either
standard or ICU format).
In case translation is new we're going to use predefined format (using
new configuration option new_message_format).
#300
* Make sure new_message_format configuration is defined
Let the default configuration overlap with Symfony configuration option
default value.
#300
* Pass to converter new_message_format configuration
#300
* Make sure importer is aware of ICU domain format
Because of MessageCatalogue interface limitation we're using NSA to
access raw messages data.
Additionally because defines() method uses isset() were force to check
raw messages data directly to check if key exits (translations from
source collection are all set to NULL).
#300
* Let code "breath" a bit
#300
* Make sure we're always aware of ICU domain
#300
* Make sure we're aware of 3 different message domains
We have:
1. Source message domain.
2. Target message domain.
3. Result message domain (this is tied to 2 of the above).
This solution assumes we'd always like to use ICU format (result message
domain) if we use it in any of source or target catalogue.
Additionally because of default NULL values in source catalogue
(internal extractor design to set NULL for "target" when creating
messages catalogue from source collection) we have to check if desired
catalogue's messages field has a key (within requested domain) or not.
Using MessageCatalogue::defines() would return false for catalogue
without translation (NULL value).
Lastly - make sure internal messages field utilised result message
domain for consistency with result field.
#300
* Persist PHP CS Fixer changes
#300
* Apply PHP CS fixer automated fix
* Fix main PHPUnit issue
We're now providing getter method name for new field.
* Fix catalogue counter
* Make assertion more wordy
* Update configuration to have passing tests
Add new ICU messages domain.
Make sure configuration is set to before-the-modification configuration.
New messages will not be added to ICU domain.
An additional tests must be run with new option set to ICU.
This however may require functional tests refactor.
* Apply PHP-CS-Fixer suggestion
0 commit comments