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
Apologies, I'm not sure if this issue should be filed under CLI or another project.
Description:
I encountered an issue when push/pull plural keys with Tolgee and react-i18next integration. Here's the situation:
I configured a key foo.bar as plural in Tolgee.
When I run tolgee pull --api-key tgpak_xxx, the translation file generates the following structure:
// public/i18n/{ns}/{lng}.json{"foo": {"bar_other": "These are {{count}} books.","bar_one": "This is a book."}}
When I push this file back, a conflict warning appears. Selecting "KEEP" results in Tolgee adding an additional foo.bar_other key on the platform.
On the next pull, the cli fails with the following error:
🔴 API reported a server error. Please try again later [status: 500, code: unexpected_error_occurred]
And docker logs
io.tolgee.ExceptionHandlers : java.lang.IllegalStateException: Cannot add item to node. This is a bug, data should be sorted by key name path. Path: foo.bar_other
If I delete the additional foo.bar_other key, the pull works as normal.
Caused by: Some languages have only single plural form (for example the zh-Hant). When deciding wether the key is plural or not during import we check if there are multiple keys matching the the plural keywords and since there is only one such key for those languages Tolgee assumes the key is not a plural and creates separate entry for it.
Apologies, I'm not sure if this issue should be filed under CLI or another project.
Description:
I encountered an issue when push/pull plural keys with Tolgee and react-i18next integration. Here's the situation:
I configured a key
foo.bar
as plural in Tolgee.When I run
tolgee pull --api-key tgpak_xxx
, the translation file generates the following structure:When I push this file back, a conflict warning appears. Selecting "KEEP" results in Tolgee adding an additional
foo.bar_other
key on the platform.On the next pull, the cli fails with the following error:
And docker logs
foo.bar_other
key, the pull works as normal.Environment:
tolgee/tolgee:latest:
amd/64 sha256:8cdf62883cde1b9305d8995175d17133ec968b4c868bea5d586212b440846958
@tolgee/cli:
2.4.1
.tolgeerc:
How to Reproduce:
zh-Hant
as the base language..tolgeerc
and runtolgee pull --api-key tgpak_xxx
,tolgee push --api-key tgpak_xxx
to sync translations.The text was updated successfully, but these errors were encountered: