Releases: Clpsplug/I18nTools
1.4.0
What's Changed
Added
- #6 Reference text asset within the resource folder.
- To use files from resource folder, use
<lang>_fileref
key and specify file name within the Resource folder.
- To use files from resource folder, use
- #6 In editor, you can now click "Copy text for primary language to TMP component" to quickly apply the text you're referring to with the static I18n label component.
Full Changelog: 1.3.1...1.4.0
1.3.1
1.3.0
Added
- Integer-hash-based string search! The plugin now prefers finding the strings using an integer hash generated from a string. This is added to hopefully minimize the computational and allocation cost by operating on the key string.
- The hashing function is FNV-1a, which is provided as an extension method
string.Fnv1aHash()
. - If the hashes collide, you can return to the previous string key notation.
- The I18n Static Labels still make use of the string key notation - the keys are converted into hashes when they are instantiated.
- The hashing function is FNV-1a, which is provided as an extension method
- Option to generate the
I18nKeys
class whose members are all hash integers.- The option to generate the class with string keys remains, but it's deprecated.
Changed
- Referring to the localized string using the string key notation (
example.string
) from the code is now discouraged.- The author strongly recommends using the
I18n String Tools
to generate theI18nKeys
class with its members being hash integers.
- The author strongly recommends using the
Note
This change does NOT fully deprecate the usage of the string key notation, as it is still used for the static labels
and use cases where you want to show a random text from children of a localized string data of a specific key.
Only the usage of the string key notation from the code (i.e., I18nString.For
) is deprecated.
Full Changelog: 1.2.1...1.3.0
1.2.1
Fixed an unnecessary 'using' line breaking builds...
Full Changelog: 1.2.0...1.2.1
1.2.0
This release lets you use different asset paths for the string resource file!
Added
I18nStringConfig
scriptable object- Can be created by `Assets > Create > ClpsPLUG > I18n > I18n String Configuration
- MUST exist in
Assets/Resources/I18n/I18nStringConfig.asset
to work - Lets you pick a different asset path for the string resource file (NOTE: The resource file must still be in the
Resources
folder).
- Custom inspector view for I18n Static Label (Both TMP UGUI and regular TMP)
- The component now previews the text this plugin will display, given the key in the textbox.
Full Changelog: 1.1.5...1.2.0
1.1.5
This update fixes the issue of missing characters when including numbers and symbols and adds the ability to force-include all alphabets (upper and lowercase).
Added
- A new option to the I18n String Tools
- "Include all alphabets"
This option adds A-Z and a-z no matter what. If you expect that users will input any alphabet, tick this option.
- "Include all alphabets"
Fixed
- Made the option in the I18n String Tools "Include numeric (and related) chars" include the same characters TextMeshPro would include when you select the "Numbers + Symbols" option.
Full Changelog: 1.1.4...1.1.5
1.1.4
Fixed code not compiling because of wrong imports used.
Full Changelog: 1.1.3...1.1.4
1.1.3
This update adds the ability to detect string resource modification and prompts the user to regenerate the i18n key file.
Added
- Warning when the hash of the current string resource and the hash recorded on the i18n key file do not match.
Full Changelog: 1.1.2...1.1.3
1.1.2
1.1.1
Quick fixes
This release fixes bugs present in the previous version and optimises some stuff.
Added
- XML docs for newly added classes and their members.
Fixed
- String Tools failing to get the characters used in the string resource
- BREAKING SupportedLanguageLoader is now singleton because it had been reading a TextAsset whenever required. Now, it only loads once.
Full Changelog: 1.1.0...1.1.1