Skip to content
This repository has been archived by the owner on Apr 28, 2024. It is now read-only.

Releases: userfrosting/i18n

4.5.0

21 Apr 00:34
315a2b8
Compare
Choose a tag to compare
  • Added Windows OS to CI tests
  • Updated dependencies
  • Improved testing for edge cases

4.4.3

28 Dec 19:37
67c536b
Compare
Choose a tag to compare
  • Replaced Travis with GitHub Action for build
  • Upgrade deprecation in tests

4.4.2

24 Jun 22:42
6c32988
Compare
Choose a tag to compare

Fixed issue where locale files from higher priority locations would not overwrite files from lower priority locations.

N.B.: This fix means the files withing the same locations will be loaded in BACKWARD order. Having the location order is more important in this case.

4.4.1

29 Apr 01:54
3cc5509
Compare
Choose a tag to compare
  • Throws an exception if translate placeholder are not numeric or array.
  • Fix issue with numeric placeholder with non plural keys. See userfrosting#1090.

4.4.0

18 Mar 01:03
9f2e255
Compare
Choose a tag to compare

Complete rewrite of the Translator.

Instead of LocalePathBuilder -> MessageTranslator, the new translator introduce the concept of Locale, Dictionary and Translator. So now you create a locale, which enables you to create a dictionary for that locale, which finally allows you to create a translator which will used that dictionary.

Instead of loading multiple locale on top of each other, a locale can depend on other locale using the configuration file (ie. locale.yaml). See the updated doc for more information.

Plural rule are now defined in the locale configuration file instead of the special @PLURAL_RULE key.

All methods of the Translator are the same for backward compatibility. The only change is the constructor, which now requires a DictionaryInterface instance.

Detailed changes :

  • MessageTranslator is now Translator.
  • Translator requires a DictionaryInterface as some constructor argument instead of paths.
  • LocalePathBuilder removed.
  • DictionaryInterface now extends UserFrosting\Support\Repository\Repository instead of the Translator. The raw data can be accessed using the Dictionary methods.
  • @PLURAL_RULE special key removed. Use the Locale configuration file (locale.yaml) plural_rule attribute instead.
  • Translator can't load multiple locale anymore. Use the Locale configuration file parents attribute instead.

See updated documentation for more details on how to use the new Translator, Locale and Dictionary.

4.3.0

22 Jun 21:52
c964f2d
Compare
Choose a tag to compare
  • Dropping support for PHP 5.6 & 7.0
  • Updated Illuminate dependencies to 5.8
  • Updated PHPUnit to 7.5

4.2.1

24 Mar 03:24
da1eb3d
Compare
Choose a tag to compare
  • 100% Test coverage (#9)
  • Factor translate() into smaller methods (#3)
  • Fix misc issues for edge cases, especially when a plural rule couldn't be found
  • General code improvements, test optimizations and code styling

4.2.0

13 Jan 20:59
cb48787
Compare
Choose a tag to compare
  • Replaced rockettheme/toolbox with userfrosting/uniformresourcelocator from userfrosting/support 4.2.0.

4.1.0

18 Jun 18:39
Compare
Choose a tag to compare
  • MessageTranslator is now an extension of the base Repository class in userfrosting/support.
  • Factored out the path building methods into LocalePathBuilder.
  • Removed loading methods. We now rely on the ArrayFileLoader class in userfrosting/support.

4.0.2

27 Feb 23:45
Compare
Choose a tag to compare

Support for pluralization
Support for subkeys and compound translations
Uses Twig to interpolate placeholders - allows us to use Twig's filters