Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for JSON export #66

Merged
merged 5 commits into from
Feb 5, 2024

Conversation

ahtinurme
Copy link
Contributor

@ahtinurme ahtinurme commented Feb 2, 2024

Decided to merge all 3 PRs into one as they are all related to JSON export:

  1. When using along with https://github.com/xiCO2k/laravel-vue-i18n which generates "php_*.json" files along for every locale, I can ignore those files, but the ignored files are still by default used for locales.

For example:
If I have two locales, "et" and "ru", by default import is also trying to find locales for ignored files, and locales "php_et" and "php_ru" which do not exist.

  1. As per Laravel documentation (https://laravel.com/docs/10.x/localization#introduction), the locale JSON files always reside in the main translations folder, not in the specific locale folder.
  2. when exporting the JSON strings, dot in the keys are treated as start of a sub-translation, which is incorrect assumption.
  3. When exporting to JSON, slashes are escaped by default which is not expected behaviour, as translations from JSON files are stored/used unescaped.

@ahtinurme ahtinurme changed the title Should ignore excluded locales Fixes for JSON export Feb 2, 2024
@MohmmedAshraf MohmmedAshraf merged commit 9b40b57 into MohmmedAshraf:main Feb 5, 2024
4 of 5 checks passed
@MohmmedAshraf
Copy link
Owner

Thanks @ahtinurme

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