Comments (5)
That should have been recently fixed. Thanks for the feedback!
from rails.
Hi @ChillyFlashER,
I don't understand the issue.
Are you talking about the top element in the YAML file? Which on, translation.*.yml
or localization.*.yml
?
The top element should be the same as the languages you defined in the config/translation.rb
file.
Could you be more specific about your issue and paste some snipped of your configuration and problematic YAML files?
(Sorry for the delay, I'll try to be more reactive from now)
from rails.
Hi,
When we first setup new languages the top element in the YAML file the header didn't match the language code.
This was a while ago and I haven't tried it again. It might just have been something to do with our first setup that went wrong or something similar.
So when we generated new files for languages like da-DK it produced a file like this.
## Source: config/locales/localization.da-DK.yml
# THIS FILE CONTAINS LOCALIZATION KEYS : date and number formats, number precisions,
# number separators and all non-textual values depending on the language.
# These values must not reach the translator, so they are separated in this file.
#
# More info here: https://translation.io/blog/gettext-is-better-than-rails-i18n#localization
#
# You can edit and/or add new localization keys here, they won't be touched by Translation.io.
#
# If you want to add a new localization key prefix, use the option described here:
# https://github.com/aurels/translation-gem#custom-localization-key-prefixes
#
---
da:
...
And the gem was looking for da-DK so it couldn't find the translations, we fixed it by manually changing all the keys of languages that has a dash in it.
from rails.
Thanks @ChillyFlashER,
I understood the issue, I'll try to reproduce this error but it seems weird, it should definitely work as expected.
I'll keep you in touch.
from rails.
I can confirm that you are absolutely right. It only impacts localization.xx.yml
files (not translation.xx.yml
files).
It still works quite good since "de-DE" fallbacks to "de" and "da-DK" fallbacks to "da". But I need to fix this. Thanks a lot!
from rails.
Related Issues (20)
- Gettext translations cached after switching locale? HOT 4
- Special characters in translation HOT 2
- Isn't it possible to only use gettext? HOT 2
- Deprecation warning for #has_rdoc (Rubygems) HOT 2
- Do not add methods on Object HOT 3
- Empty hash in localization.en.yml
- Strings not get synced
- Unclear how to use custom locales in project HOT 5
- Crash on "rake translation:init" HOT 3
- getText method not translating text as supposed to after install and intialization HOT 7
- Deprecation warning on Rails 6 HOT 4
- Need a suggestion on how to keep the source pluralization clean HOT 2
- Error while running `translations:sync`: ArgumentError: comparison of Pathname with String failed HOT 3
- When disabling gettext in the initialiser gettext directory and files are still created HOT 3
- gettext strings missing after use of case statement in erb HOT 20
- A way to exclude translation keys HOT 3
- Ruby 3.1 compatibility (Psych 4 breaking change) HOT 7
- Match I18n fallbacks in GetText HOT 2
- ignore specific files HOT 4
- Error when starting Pushion Passenger HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rails.