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

[RFC] Alternate structure for translation files #34121

Closed
ro0NL opened this issue Oct 25, 2019 · 4 comments
Closed

[RFC] Alternate structure for translation files #34121

ro0NL opened this issue Oct 25, 2019 · 4 comments
Labels
RFC RFC = Request For Comments (proposals about features that you want to be discussed) Translation

Comments

@ro0NL
Copy link
Contributor

ro0NL commented Oct 25, 2019

Looking at the translations/ directory, it holds N*N files. That is each domain, for each locale:

domain.en.yaml
domain.nl.yaml
other.en.yaml
...

instead, i like to propose:

en/
  domain.yaml
  other.yaml
nl/
  domain.yaml

The directory is much less cluttered:

  • we see the supported locales
  • in the default locale we the supported domains
  • adding a new locale is simple like cp -R en fr

Thoughts?

@wouterj
Copy link
Member

wouterj commented Oct 25, 2019

Or should we have some path_template setting oid that allows you to configure your dir structure? I.e. %locale%/%domain%.yaml?

@ro0NL
Copy link
Contributor Author

ro0NL commented Oct 25, 2019

actually i think we can do it more simple, and avoid deprecation or new configs

en/messages.yaml
messages.en.yaml # top-level override

i think these 2 structures are sufficient, and allows to mix&match or stick with your structure of choice

@yceruto
Copy link
Member

yceruto commented Oct 25, 2019

This is currently supported:

en/
  domain.en.yaml
  other.en.yaml
nl/
  domain.nl.yaml

Can it work for you?

@ro0NL
Copy link
Contributor Author

ro0NL commented Oct 25, 2019

i see, it's because of how symfony/finder works right? Could appreciate an explicit lookup for locale/domain.yaml though 👼 not sure it's worth it then.

@xabbuh xabbuh added RFC RFC = Request For Comments (proposals about features that you want to be discussed) Translation labels Oct 26, 2019
@ro0NL ro0NL closed this as completed Oct 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFC RFC = Request For Comments (proposals about features that you want to be discussed) Translation
Projects
None yet
Development

No branches or pull requests

4 participants