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

i18n is case sensitive but folders arent #94

Closed
flx-sta opened this issue Jun 19, 2019 · 4 comments
Closed

i18n is case sensitive but folders arent #94

flx-sta opened this issue Jun 19, 2019 · 4 comments
Assignees
Labels

Comments

@flx-sta
Copy link
Contributor

flx-sta commented Jun 19, 2019

While I was working on the german translation for peregrine I had to realise, that the key (which is the english word) for translation is case sensitive but creating folders in the i18n.admin.de directory is not.

For example you have the following 2 code lines

<span>{{ $i18n('Create') }}</span>
<span>{{ $i18n('create') }}</span>

You could either translate Create or create. But not both since you can't create a directory "Create" and then "create".

@bkheadwire
Copy link
Collaborator

@reusr1 this was already semi-fixed as part of PR #95 - all keys are lowercased before requesting translations. However, this effectively means that anything that goes through i18n ends up coming back with whatever capitalization is in the i18n tree regardless of what it looked like initially. Thoughts?

@bkheadwire bkheadwire moved this from Needs triage to Low priority in 1.0.0 Release Sep 20, 2019
@flx-sta
Copy link
Contributor Author

flx-sta commented Sep 25, 2019

The current fix is not a really a fix more like a workaround.

I would rethink the concept and think about using actual unique keys since this is the more common used concept

e.g:

// de.properties
EXPLORER_BUTTON_REMOVE=entfernen

// en.properties
EXPLORER_BUTTON_REMOVE=delete

@flx-sta
Copy link
Contributor Author

flx-sta commented Jan 29, 2020

So I came to understand thats it is actually possible to use a key-approach (based on file-names though).
Just put the key into the i18n/de and i18n/en directories

@flx-sta
Copy link
Contributor Author

flx-sta commented Jan 29, 2020

See #297

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
1.0.0 Release
  
Closed
Development

No branches or pull requests

3 participants