Changelog
All notable changes to this package will be documented in this file.
[0.10.0] - 2021-01-20
Added
- Added
GetDefaultTableAsync
toLocalizedDatabase
. This can be used to get the DefaultTable directly. - Added
HasChangeHandler
toLocalizedString
andLocalizedAsset
. (LOC-111) - Added
GenerateCharacterSet
toStringTable
andStringTableCollection
. This can be used to extract the unique characters used by 1 or moreString Tables
. This could then be used with a Font Atlas creator. It is also possible to export a Character Set file from the Export menu of the String Table window, the String Table Collection window, or the Localization Tables window. - Added new Google Sheets example
SmartStringColumn
for synchronizing the Smart String property of an entry. - Added Global Variables to Smart Strings. Global Variables can be defined in a
GlobalVariableGroup
asset which can then be added to aGlobalVariableSource
in the Smart Format Sources list. Variables can then be referenced in a Smart String without the need to pass arguments. For example:{group-name.variable-name}
. When aGlobalVariables
value is changed via script, it will automatically trigger anyLocalizedString
that is using it to refresh. See Samples and docs for further details. - Added
HasTagMetadata
toTableEntry
. - Added PreLoadTables to LocalizedDatabase. This can be used to force tables to be loaded, including their contents without having to set the preload flag in the editor.
- Added fallback support. When a localized value is missing then the Locale fallback metadata or CultureInfo will be used to find a suitable fallback Locale. This can be enabled project-wide through the Localization Settings String Database or Asset Database, it can also be configured on a per-item basis for LocalizedStrings.
- Added useFallback parameter to LocalizedStringDatabase.GetLocalizedStringAsync & LocalizedDatabase.GetTableEntryAsync. This can be used as a flag to enable FallBack behavior for Locales that have missing translations.
- Added Custom Locale UI Window. This can be used to add any custom Locales that are not supported in CultureInfo class or the SystemLanguage.
- Added Preloading Screen sample. This shows how you can wait for the
InitializationOperation
to complete.
Changed
- Reduced the amount of garbage being generated by requests for localized strings and assets. The operations inside of
AsyncOperationHandle
are now returned in the subsequent frame after completion. If you wish to hold onto anAsyncOperationHandle
you should callAddressables.ResourceManager.Acquire
to prevent the operation being reused andAddressables.Release
to allow for it to be reused. - Merged all Third Party dependencies into a single library Unity.Localization.ThirdParty.Editor.dll. This will prevent conflicts when projects/packages use the same libraries. Google Sheets, Newtonsoft Json and CsvHelper can still be accessed by adding Unity.Localization.ThirdParty.Editor as an Assembly Reference to your own asmdef files.
- Removed dependency on package com.unity.nuget.newtonsoft-json. It is now part of the combined dependencies.
- Updated Third Party dependencies. Google Sheets to v.1.49.0.2111, CsvHelper to 15.0.9 and Newtonsoft.Json to 12.0.3.
- Clicking the Localized Table Collection name label will now toggle the selector foldout for
LocalizedString
andLocalizedAsset
. (LOC-125) - Significant improvements to Smart String overall performance. Testing showed results of an average of 10x less garbage and runs 2-3x faster.
- Updated Smart Strings with changes from SmartFormat v2.5.3.0-preview1.
- Internal string comparisons (i.e. for placeholder names) are no more culture-specific, but Ordinal or OrdinalIgnoreCase respectively.
- ListFormatter will now process IList data sources only.
- Removed SmartObjects
- Updated to Addressables 1.6.13.
- It's now possible to import
StringTableCollections
andAssetTableCollections
into new or existing projects. When importing the Collection will create/update the Addressables and create any missing Locales in the project. - Changed sample Language Selection Menu (UGUI) to use the Native name for Locales.
- The
Localization Tables
window search field is no longer cleared when changing selected table. - After pulling from a Google Sheet, the order of the keys in the table will now match the order of the Google Sheet.
- When pushing to a Google Sheet, Table entries will no longer be sorted by the Key Id but keep their current order, as shown in the table editor window.
- It is now possible to use a Google Sheet with Sheet Id 0.
- Creating a new
LocalizationSettings
asset in the Project Settings window no longer selects the asset. - Setting
LocalizedString
Arguments
will now triggerRefreshString
. LocalizedString.RefreshString
will no longer throw an exception if there are noStringChanged
subscribers.LocalizedStrings
that are Smart will always use Smart Format even when no arguments have been provided.- Culture-sensitive formatting now uses the
Locale
information. - The
Localization Tables
window search field is no longer cleared when changing selected table. - The
Localization Tables
window search field is no longer cleared when changing selected table. - No Translation Found message is now a Smart String and has access to several placeholders which can be used to proivide details on the missing entry.
Fixed
- Fixed exceptions being thrown when trying to load a table that does not exist. Loading missing String Tables will now use the missing translation message instead of throwing an exception when a table was missing and assets will return a failed operation handle. (LOC-120)
- Fixed DefaultTable property throwing an invalid key exception when it is empty. Now getting a value from empty DefaultTable will throw an exception.
- The LocalizedAsset selector will now filter out incompatible types. (LOC-123)
- Fixed LocalizedString Editor not preserving new items added to the Preview Arguments field. (LOC-122)
- Fixed
AddTagMetadata
creating a new tag each time instead of using an existing tag.RemoveTagMetadata
will now remove all empty tag entries, not just the first one it finds. (LOC-124) - String Table Entries which have a null or empty localized string will now be treated as missing translations and use the
No Translation Found Format
. (LOC-126) - Fixed exception when calling GetLocale and no Addressables settings exists in the project.
- Fixed XLIFF 2.0 generating empty notes nodes. (LOC-131)
- Fixed Google Sheets
PullEnd
not being called after pulling from a Google Sheet. (LOC-133 - Google Sheets
PullCellData
is now called for all cells even if the sheet cell is empty. (LOC-134) - Pulling a Google Sheet using an API Key will now use the correct public API and no longer produce authorization errors. (LOC-139)
- Calling
LocalizationEditorSettings.GetLocales
will no longer create a new Addressable Assets Settings file if one does not exist. (LOC-142) - Fixed a bug where the Locales list were not been updated, when the New Table tab is open and the Locale name was changed.
- Improved
LocalizationSetting
editor performance. The editor is now using UI Toolkit to render and should be much smoother. (LOC-90) - Fixed Smart String editor becoming corrupted when a parsing exception was thrown in the Debug view.
- Fixed exception being thrown by
GetSourceExtension
andGetFormatterExtension
when no value could be found. - Fixed
LocalizedAsset
Property Drawer not resolving the asset type when displaying a list ofLocalizedAssets
. - Fixed preloaded Sprite assets having the incorrect type(Texture). (LOC-142)
[0.9.0] - 2020-10-27
Added
- Added support for exporting and importing
StringTables
andStringTableCollections
as XML Localisation Interchange File Format (XLIFF). XLIFF version 1.2 and 2.0 are both supported. See docs for further details. - Added support for exporting and importing
StringTableCollections
as Comma Separated Values (CSV). - Added
GetRowEnumerator
toAssetTableCollection
andStringTableCollection
. This can be used to step through each key and its localized values. - Added
ReleaseAssets
to allow for forcing allAssetTable
assets to be released. This is called automatically when theLocalizationSettings.SelectedLocale
is changed.
Changed
- Updated to Addressables version 1.16.6.
- Editor Foldout fields now toggle when clicking on the label.
- When enabling preload on Asset Tables, all assets will now be preloaded by default instead of requiring the
PreloadAssetTable
Metadata. Adding aPreloadAssetTable
can be used to disable this default behavior. (LOC-114) SmartFormat
editor will now show parsing and format errors in the preview field.- Added title header to Google Sheets extension property drawer.
Fixed
- Fixed smart
StringTableEntry
returning the wrong localized string after its value was changed. - Fixed
LocalizedAsset
from loading when it contained an empty reference. (LOC-109) - Fixed
InvalidCastException
when callingAssetTable.GetAssetAsync
and the table was preloaded. (LOC-114) - Fixed bug in
PreloadDatabaseOperation
that caused it to complete before preloading was finished. (LOC-114) - Fixed Tables Window throwing exceptions when editing a collection which had 1 or more tables without a matching locale in the project.
- Fixed
ProjectSettings.asset
being modified on disc during a build. - Fixed
LocalizedString
property drawer throwingNullReferenceException
when selecting a Localization Table Collection which did not have a table for every Locale in the project. (LOC-118) - Calling
AddKey
will now check if the new Id is already in use and generate a new Id if it is. This means it is now safe to use custom Id values. SharedTableData
that contains an empty Guid will now be repaired when loaded in the editor.- Fixed
SmartFormat
editor becoming corrupt when showing preview andThrowException
action was enabled in ParseError or FormatError. [(LOC-119)(https://issuetracker.unity3d.com/issues/editor-ui-is-broken-when-editing-a-smart-string-and-throwexceptions-error-mode-is-enabled)] - Increased max width for
Localization Tables
window Id field so large keys can be fully visible.
[0.8.1] - 2020-08-19
Fixed
- Fixed incorrect Further Reading URL in Pseudo-Localization documentation page.
- Fixed changes to tables not being saved due to them not being set dirty when edited through the Table Editor.
[0.8.0] - 2020-08-17
Added
- Added
IKeyGenerator
toSharedTableData
. This is now used to generate the unique ids for each key. By defaultDistributedUIDGenerator
will be used to generate the keys however it is possible to change it back to Sequential by assigningSequentialIDGenerator
toSharedTableData.KeyGenerator
. See docs for further details. - Added
PreserveTags
Pseudo-localization method. This will prevent tags such as rich text or xml from being modified by any subsequent Pseudo-localization methods. (LOC-86) - Added
LocalizeSpriteEvent
component. This can be used for LocalizingSprite
assets. - Added
Localize
context menu item for UGUIImage
component. This will add and setup aLocalizeSpriteEvent
component. - Added
Group
property toStringTableCollection
andAssetTableCollection
, This can be used to customize the menu grouping when selecting a Table Collection. - Locales can now be sorted in the Localization project settings view.
- Added
SortOrder
property toLocale
. This can be used to override the default sorting order. This value is set automatically when changing the order in the editor. - Added
CheckForMissingSharedTableDataEntries
toStringTable
andAssetTable
. This will find any entries in the table that are missing matching Shared Table Entries. These missing entries can be repaired with theMissingEntryAction
parameter. - Added
RemapKey
toSharedTableData
. This will let the Id of a key be changed. - Added
LocalizedStringTable
andLocalizedAssetTable
. These work in a similar way toLocalizedString
andLocalizedAsset
but will return a Table instead of a single table entry. - Added new Sample: Simple Language Selection Menu (IMGUI). Includes 2 different examples of a Locale selection menu.
Changed
- Changed Table Entry Key Id data type from
uint
tolong
. All Methods that were using auint
now require along
. IPseudoLocalizationMethod
methodTransform
now passes aMessage
instead of a string.- The Locale column order in the
Localization Tables
window is now determined by the Locale's order. - Upgraded to latest
Newtonsoft Json
package2.0.0
. - Renamed
LocalizedTable
toLocalizationTable
. - Renamed
LocalizedTableT
toDetailedLocalizationTable
- Renamed
LocalizedTableCollection
toLocalizationTableCollection
- Improved error message when a Locale can not be selected during initialization.
- Replaced
LocalizedString
RegisterChangeHandler
andClearChangeHandler
with the eventStringChanged
. - Replaced
LocalizedAsset
RegisterChangeHandler
andClearChangeHandler
with the eventAssetChanged
.
Fixed
- Fixed StringTableCollection assets not being set dirty when pulling from a Google Sheet in the editor. (1240528)
- Fixed StringTableCollection assets not being set dirty when pulling from a Google Sheet in the editor.
- Fixed
LocalizedString.GetLocalizedString
not using the argument provided inLocalizedString.Arguments
. - Fixed serialization errors
Should not occur! Internal logic error: please report bug.
whenComment Metadata
was attached to the table or shared table data. (LOC-104) - Fixed
LocalizedDatabase.GetTableAsync
trying to load an already loadedLocalizedTable
when using a GUID TableReference. This was causing preloaded tables to still require some loading. - Fixed "LocalizationSettings has a different serialization layout" error. Moved the
Locale GameView Menu
property from LocalizationSettings to EditorPrefs and moved the menu option intoPreference/Localization
. (LOC-99) - Fixed
GoogleSheets
push not handling Table entries that were missing matching Shared Table Entries, this would cause future rows to be blank. (LOC-102) - Fixed
NullReferenceException
inLocalization Settings
when Editor window focus was lost and Smart Format properties field was visible. (LOC-101) - Fixed
Available Locales
not updating when performing an Undo/Redo after adding or removing a Locale. LocalizedString
andLocalizedAsset
property drawers now remember the expanded state of each Locale field when an Undo/Redo occurs. (LOC-105)- Added Undo support when adding and removing a table from a
StringTableCollection
orAssetTableCollection
. When Undo is not used the asset will be set dirty so changes are not lost. (LOC-107)
[0.7.1] - 2020-06-05
Added
- Added
StringTableCollection
andAssetTableCollection
. These are editor only assets for controlling a collection of string or asset tables. Tables that are not part of a collection will now be ignored. To upgrade old table assets select one and press theCreate Collection
button in the inspector. - Added Google Sheets support. A
StringTableCollection
can by pushed and pulled by using theGoogle Sheets Extension
in the editor or through script with theGoogleSheets
class. Table entry values, comments and metadata can be synced to a Google Sheet. This is currently an Editor only feature. - Added
DisplayName
attribute. This is an optional attribute forMetadata
andCollectionExtensions
so that a custom name that can be displayed in the editor instead of the class name. - Added
LocalizationSettings.SelectedLocaleAsync
. This is a safer alternative toLocalizationSettings.SelectedLocale
as it will ensure that theAvailableLocales
is initialized.
Changed
- Renamed
LocalizeStringBehaviour
toLocalizeStringEvent
. - Renamed
LocalizeAudioClipBehaviour
toLocalizeAudioClipEvent
. - Renamed
LocalizeTextureBehaviour
toLocalizeTextureEvent
. - Renamed
TableName
toTableCollectionName
. - The editor class
AssetTableCollection
has been repurposed. Please see the newStringTableCollection
andAssetTableCollection
assets. LocalizationEditorSettings
has changed:- Replaced
ModificationEvent
withEditorEvents
class AddAssetToTable
andRemoveAssetFromTable
have been moved toAssetTableCollection
- Added
GetStringTableCollection
,GetStringTableCollections
,GetAssetTableCollection
andGetAssetTableCollections
. - Removed
RemoveTable
,GetAssetTables
,GetAssetTablesCollection
. These features are replaced byStringTableCollection
andAssetTableCollection
. - Simplified
ILocalesProvider
interface Only 1GetLocale
function is now required. - Updated code Samples to include Creating Locales, Loading Strings, Google Sheets and a Language selection menu example.
- Replaced
Fixed
- Fixed
Asset Tables Window
throwingNullReferenceException
when editing Metadata for an entry that does not exist in the selected table. - Fixed incorrect installation instructions in documentation.
- Fixed
SerializedTableEntryReference
not handling key names correctly, which could cause issues with LocalizedString and LocalizedAsset. (case 1230444) - Fixed
TableReference
returning invalid value for TableName when type is Guid. - Fixed
UpdateString
not being called When a newLocalizedString
was assigned toLocalizeStringEvent.StringReference
. - Fixed
UpdateAsset
not being called When a newLocalizedAsset
was assigned toLocalizeStringEvent.AssetReference
. - Fixed
LocalizedString
andLocalizedAsset
trying to localize when they are empty. (case LOC-88) - Localized String editor now clips Locale labels instead of letting them overlap into the preview label. (case LOC-84)
- Fixed Available Locales List is not updating when a Locale is added or removed from the project. (case LOC-79)
- Fixed
LocalizedAsset
andLocalizedString
editor not updating when a Locale is added or removed from the project. - Fixed
SharedTableData
Metadata child properties not being visible or editable in the Table Window. (case LOC-85) - Fixed Smart Format toggle field overflowing into Metadata button when Table Window columns were narrow. (case LOC-95)
- Fixed
LocalizedStringDatabase
andLocalizedAssetDatabase
using theSelectedLocale
beforeAvailableLocales
was initialized. (case 1225937) - Fixed Asset Tables losing data due to not being set dirty when a change was made. (case LOC-82)
- Fixed ListFormatter Names property going null in player builds.
[0.6.1] - 2020-02-18
Added
- Added IEquatable to LocaleIdentifier.
Changed
- Changed collection properties to be read only (rule CA2227).
- Made AddressableEntryNotFoundException public.
Fixed
- SystemLocaleSelector will now check the CultureInfo before checking Application.SystemLanguage to allow for selecting regional languages first.
- Fixed
LocalizedAssetTexture
andLocalizeAudioClipBehaviour
not serializing the asset reference field. (case 1216072)
[0.6.0] - 2020-01-27
Added
- Added PseudoLocale and Pseudo-localization methods(Accenter, CharacterSubstitutor, Encapsulator and Expander). This is used to generate Pseudo-localization using various methods during runtime(See docs for further info).
- Added support for loading multiple Locales from String and Asset Databases. By Default the
LocalizationSettings.SelectedLocale
will be used however it is now possible to provide a Locale as an argument. This means Localization data for multiple Locales can exist which allows for fallback Locales or just showing multiple languages at once. - Added exception to LocalizedTable.TableName if the SharedTableData is null.
- Added
Locale Generator
button toNew Table
tab.
Changed
- Renamed
KeyDatabase
toSharedTableData
. - Changed
Comment
metadata TimeStamp property type to DateTime. - Disabled Addressables Settings asset creation during Localization OnPostprocessAllAssets. This could cause corruption of Addressables data due to OnPostprocessAllAssets execution order when importing a project for the first time.
- Updated to Addressables version 1.5.1.
- Addressable groups now use the NoHash BundleNamingStyle by default.
Fixed
- Fixed
NullReferenceException
sometimes being thrown by LocalizedString or LocalizedAsset during ClearLoadingOperation. - Fixed
NullReferenceException
when adding SmartFormatter Source in String Database inspector. - Fixed
ArgumentOutOfRangeException:
in StringTables when enabling a Missing Tables column. - Fixed LocalizedReference field label overflowing when a selected key had multiple lines.
- Fixed LocalizedString property drawer adding too much vertical whitespace.
- Fixed items in Reorderable Lists ignoring the right border.
- Fixed LocalizedTableT entry Id not being updated when entry was moved or removed.
- Fixed GameViewLanguageMenu causing LocalizationSettings to Initialize when there was no Addressables/Locales in the project.
- Fixed Key name being unchangeable when its name was empty in the Asset Tables window.
- Fixed Search field border being too small in the Asset Tables Window.
- Fixed
New Table - Create
button being enabled when no locales were selected or existed in the project. - Fixed
LocalizedString
andLocalizedAsset
not automatically updating when theTableReference
orTableEntryReference
was changed and aChangeHandler
was being used. - Fixed Addressable flags including
Preload
being removed during AddOrUpdateTable.
[0.5.1] - 2019-11-22
- Updated to Addressables version 1.3.8.
- Fixed
ArgumentOutOfRangeException:
in the Tables window when only 1 string or asset table existed. - Exposed CreateAssetTableCollection in LocalizationEditorSettings.
- Implemented IDictionary to LocalizedTableT and Removed TableEntries property.
- Fixed LocalizedTableT not serializing changes made when using the Dictionary interface.
- Added LocalizedTableT.CreateTableEntry, this should be used when creating a StringTableEntry or AssetTableEntry.
- ArgumentNullException is now thrown when using a null ChangeHandler with LocalizedString.RegisterChangeHandler or LocalizedAsset.RegisterChangeHandler.
- Fixed PluralLocalizationFormatter using the Selected Locale when a CultureInfo provider was used.
- Current loading operations are now cleared when using ClearChangeHandler with LocalizedAsset and LocalizedString
- Added default constructor to FallbackLocale Metadata.
- Fixed error spamming when adding Metadata that does not have a default constructor.
- Removed missing image from LocalizationTablesWindow manual page.
[0.5.0] - 2019-11-04
- Updated to Addressables version 1.2.4.
- Removed type specific asset tables. The AssetTable class can now hold mixed types per entry.
- Removed Custom Locale support from Locale Generator Window. You should use Metadata to modify the Locale instead.
- Removed Preload behaviour from Localization Settings. Preload behaviour can now be controlled per table through the Asset Tables Window.
- Removed Addressable tests. These would cause issues when run in a project already using Addressables. They have been moved to an internal test suite.
- Removed Key Database field from New Table panel. Key databases should not be shared now as they act as the Table Name Guid.
- Added Metadata to Locale, LocalizedTable and TableEntry. Metadata can be used to add additional data that implements the IMetadata interface and is serializable.
- Added PreloadAssetTable Metadata. Add this to an AssetTable to configure the preload behaviour for individual assets contained in the table. By default the assets will not be preloaded if this is not present.
- Added PreloadAsset Metadata. Add this to Asset Table entries when using PreloadBehaviour.PreloadSelected to select the entry for preloading.
- Added Comment Metadata. This can be added to any Metadata to provide comments. In the future these comments will be extracted when exporting to external formats.
- Added SmartFormat for StringTables. This allows for advanced formatting of strings. Comes with support for named placeholders, lists, pluralization, gender, code reflection support and much more.
- Added Table Name Guid. Table Names can now be referenced by a Guid so that changes to the name do not break references.
- Fixed Locale Generator Window button
Generate Locales
staying disabled when usingSelect All
. - LocaleGeneratorListView now shows Locales that are already in the project.
- New Locales are now added to Addressables when created.
- Changed the name format for Tables for Addressables and asset creation to start with the name followed by the locale.
- Improved LocalizedString editor. It is now possible to modify the selected entry details in the Inspector without opening the Asset Tables Window.
- Moved Localization Table editor window option to Window/Asset Management/Localization Tables.
[0.4.1] - 2019-07-09
- Updated to Addressables version '1.1.4-preview'.
[0.4.0] - 2019-06-14
- Added AutoUpdate to LocalizedStringReference class. When enabled, the string will automatically be loaded any time a change is detected and the UpdateString event can be used to update the string. With AutoUpdate enabled calling GetLocalizedString is not necessary.
- Fixed StringTableEditor changes being lost when using inline editing.
- Fixed LocalizationBehaviour not updating the first time when LocalizationSettings are already initialized.
- Fixed LocalizationBehaviour not updating correctly if the asset or table has already been loaded.
- Improved drop down label in LocalizedStringReferencePropertyDrawer. Multi-line text is now correctly shown. (LOC-57)
- Added KeyDatabase.FindSimilarKey. Returns the closest match using a Levenshtein approximation.
- Improved key matching when using Localize context menu for Text components.
- Updated to Addressables version '0.8.6-preview'.
[0.3.2] - 2019-05-09
- Added support for ugui package in 2019.2.0a15. ugui support is optional and will be enabled automatically if the ugui package is in the project.
- Removed support for 2018.3. The ugui support requires optional assemblies which are not supported in 2018.3.
- AssemblyScannerCache now uses UnityEditor.TypeCache in 2019.2 which should provide improved performance in Editor.
- Added an error when adding non-persistent assets to asset tables.
- Fixed StringTableEditor changes being lost due to not setting the table dirty.
[0.3.1] - 2019-05-02
- Added KeyDatabase. All string keys are now contained within this and mapped to a unique(to the database) id value which is used by the table.
- Assets are now grouped in Addressables by the locale. This allows you to serve them on-demand for a particular language, instead of bundling them with the game release. Shared assets are stored in a separate group.
- Assets are now removed from Addressables when they are not referenced by any Asset Tables.
- Fixed UIElements issues in 2019.1+.
- Merged LocalizationPlayerSettings into LocalizationEditorSettings.
- Removed AddressableAssetTableT.GetAsset. GetAssetAsync should be used instead.
- Added option in
Asset Tables Windows
to add a missing table if a table does not exist for all available Locales. - Fixed UIElements compilation issues in 2019.1+
- Updated to Addressables version '0.7.5-preview'.
- Removed support for .Net 3.5, this is due to a limitation in Addressables.
[0.2.5] - 2019-03-01
- Updated to Addressables version '0.6.7-preview'.
[0.2.3] - 2019-02-20
- Fixed adding Locales and Tables to Addressables not working when the Addressables settings asset did not exist(LOC-24).
- Fixed exception when changing a table name in the Table Editor window.
- Fixed AssetTablesField exception when no Asset Tables exist in the project.
- Updated to Addressables version '0.5.3-preview'.
[0.2.2] - 2018-12-17
- Fixed NullRefException when opening the Asset Tables window and no Asset Tables exist in the project
[0.2.1] - 2018-12-14
- Removed stray file
README - External.md
[0.2.0] - 2018-12-11
This is the first release of Unity Package Localization.
- Contains preview of asset and string localization support.