Skip to content

Conversation

jablan
Copy link
Contributor

@jablan jablan commented Feb 5, 2025

Phrase provider changes were not persisted upon exiting Unity Editor. This is due to SetDirty, which needs to be set whenever something is altered. Also we need to wait for LocalizationSettings initialization before we display the provider, as it loads the locales available in Unity.

Copy link
Member

@forelabs forelabs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not related directly to this PR, but are we able to add tests to the plugin? I recognized that we don't seem to have any automated tests.

}
UnityEngine.Localization.Locale newLocale = UnityEngine.Localization.Locale.CreateLocale(locale.code);
AssetDatabase.CreateAsset(newLocale, $"{pathToSave}/{newLocale.ToString()}.asset");
AssetDatabase.CreateAsset(newLocale, $"{pathToSave}/{newLocale}.asset");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain this change? Was it not needed at all?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, that's not needed, as string interpolation implicitly does ToString(). VS code gives a lot of these linting hints.

@jablan jablan merged commit b782896 into main Feb 5, 2025
@jablan jablan deleted the 1365-use-set-dirty branch February 5, 2025 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants