Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@mrcasals
Created September 1, 2011 12:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrcasals/1186109 to your computer and use it in GitHub Desktop.
Save mrcasals/1186109 to your computer and use it in GitHub Desktop.
LocaleApp doesn't keep the default Rails translations format
# This is the default format for Rails Translations.
# You can see the full file here:
# https://github.com/svenfuchs/rails-i18n/blob/master/rails/locale/ca.yml
ca:
date:
day_names:
- Diumenge
- Dilluns
- Dimarts
- Dimecres
- Dijous
- Divendres
- Dissabte
abbr_day_names:
- Dg
- Dl
- Dm
- Dc
- Dj
- Dv
- Ds
# Don't forget the nil at the beginning; there's no such thing as a 0th month
month_names:
- ~
- Gener
- Febrer
- Març
- Abril
- Maig
- Juny
- Juliol
- Agost
- Setembre
- Octubre
- Novembre
- Desembre
abbr_month_names:
- ~,
- Gen
- Feb
- Mar
- Abr
- Mai
- Jun
- Jul
- Ago
- Set
- Oct
- Nov
- Des
# Used in date_select and datime_select.
order:
- :day
- :month
- :year
# This is the yml I get after pushing the previous ca.yml
# file to LocaleApp and pulling it from there.
# Note the extra indentation, to "|" character and extra white lines
ca:
date:
abbr_day_names: |
---
-
- dg
- dl
- dm
- dc
- dj
- dv
- ds
abbr_month_names: |
---
-
- Gen
- Feb
- Mar
- Abr
- Mai
- Jun
- Jul
- Ago
- Set
- Oct
- Nov
- Des
day_names: |
---
-
- diumenge
- dilluns
- dimarts
- dimecres
- dijous
- divendres
- dissabte
month_names: |
---
-
- gener
- febrer
- "mar\xC3\xA7"
- abril
- maig
- juny
- juliol
- agost
- setembre
- octubre
- novembre
- desembre
order: "[:day, :month, :year]"
@mrcasals
Copy link
Author

Here are some more examples of the same problem:

From console, the original output (before LocaleApp):
Before LocaleApp

From console, the LocaleApp output:
After LocaleApp

The YAML file, before pushing to LocaleApp:
Before LocaleApp

The same YAML file, after pulling from LocaleApp:
After LocaleApp

@oriolgual
Copy link

It seems that this is only happening with Catalan locales, everything is OK with Spanish.

@tigrish
Copy link

tigrish commented Sep 14, 2011

OK, I've got an idea of what's going on here.

If you delete the abbr_month_names key in Locale the default version from rails-i18n should be included (and be valid). This should work short term.

Getting a fix for this is priority #1 for us.

@oriolgual
Copy link

Removing the overriden values from LocaleApp seems to fix the problem. Thanks @tigrish!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment