[Git][noosfero/noosfero][master] 2 commits: i18n: add countries default and change format (- instead of _)
Bráulio Bhavamitra
gitlab at gitlab.com
Thu Jun 25 21:55:55 BRT 2015
Bráulio Bhavamitra pushed to branch master at Noosfero / noosfero
Commits:
a0f633fc by Braulio Bhavamitra at 2015-06-25T20:58:35Z
i18n: add countries default and change format (- instead of _)
- - - - -
abbed37f by Bráulio Bhavamitra at 2015-06-26T00:55:32Z
Merge branch 'i18n-fix' into 'master'
i18n: add countries default and change format (- instead of _)
See merge request !613
- - - - -
15 changed files:
- app/controllers/application_controller.rb
- config/locales/de.yml
- config/locales/en-US.yml
- + config/locales/en.yml
- config/locales/es.yml
- + config/locales/fr-FR.yml
- config/locales/fr.yml
- config/locales/hr.yml
- + config/locales/hy-AM.yml
- config/locales/hy.yml
- config/locales/it.yml
- config/locales/pt-BR.yml
- − config/locales/pt.yml
- + config/locales/pt.yml
- config/locales/ru.yml
Changes:
=====================================
app/controllers/application_controller.rb
=====================================
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -72,8 +72,8 @@ class ApplicationController < ActionController::Base
FastGettext.available_locales = environment.available_locales
FastGettext.default_locale = environment.default_locale
FastGettext.locale = (params[:lang] || session[:lang] || environment.default_locale || request.env['HTTP_ACCEPT_LANGUAGE'] || 'en')
- I18n.locale = FastGettext.locale
- I18n.default_locale = FastGettext.default_locale
+ I18n.locale = FastGettext.locale.to_s.gsub '_', '-'
+ I18n.default_locale = FastGettext.default_locale.to_s.gsub '_', '-'
if params[:lang]
session[:lang] = params[:lang]
end
=====================================
config/locales/de.yml
=====================================
--- a/config/locales/de.yml
+++ b/config/locales/de.yml
@@ -3,7 +3,7 @@
# contributors:
# - Alexander Dreher - http://github.com/alexdreher - Rails 3 update
-de:
+de: &de
date:
formats:
default: "%d.%m.%Y"
@@ -221,3 +221,6 @@ de:
full_messages:
format: "%{attribute} %{message}"
+
+de-DE:
+ <<: *de
=====================================
config/locales/en-US.yml
=====================================
--- a/config/locales/en-US.yml
+++ b/config/locales/en-US.yml
@@ -2,7 +2,7 @@
#
# Use this as the base for the locale file of your language.
-"en-US":
+"en-US": &en-US
date:
formats:
default: "%Y-%m-%d"
@@ -220,4 +220,7 @@
template:
<<: *errors_template
full_messages:
- format: "%{attribute} %{message}"
\ No newline at end of file
+ format: "%{attribute} %{message}"
+
+en:
+ <<: *en-US
=====================================
config/locales/en.yml
=====================================
--- /dev/null
+++ b/config/locales/en.yml
@@ -0,0 +1 @@
+en-US.yml
\ No newline at end of file
=====================================
config/locales/es.yml
=====================================
--- a/config/locales/es.yml
+++ b/config/locales/es.yml
@@ -4,7 +4,7 @@
# - Tsutomu Kuroda - http://github.com/kuroda (t-kuroda at oiax.jp)
# Corrected by Eloy Serra Labán: http://goo.gl/i9Kts, /nQ928, /XfKaX
-"es":
+es: &es
date:
formats:
default: "%d/%m/%Y"
@@ -223,3 +223,6 @@
full_messages:
format: "%{attribute} %{message}"
+
+es_ES:
+ <<: *es
=====================================
config/locales/fr-FR.yml
=====================================
--- /dev/null
+++ b/config/locales/fr-FR.yml
@@ -0,0 +1 @@
+fr.yml
\ No newline at end of file
=====================================
config/locales/fr.yml
=====================================
--- a/config/locales/fr.yml
+++ b/config/locales/fr.yml
@@ -5,7 +5,7 @@
# - Bruno Michel - http://github.com/nono
# - Tsutomu Kuroda - http://github.com/kuroda (t-kuroda at oiax.jp)
-fr:
+fr: &fr
date:
formats:
default: "%d/%m/%Y"
@@ -222,3 +222,7 @@ fr:
<<: *errors_template
full_messages:
format: "%{attribute} %{message}"
+
+fr-FR:
+ <<: *fr
+
=====================================
config/locales/hr.yml
=====================================
--- a/config/locales/hr.yml
+++ b/config/locales/hr.yml
@@ -176,4 +176,4 @@
template:
<<: *errors_template
full_messages:
- format: "%{attribute} %{message}"
\ No newline at end of file
+ format: "%{attribute} %{message}"
=====================================
config/locales/hy-AM.yml
=====================================
--- /dev/null
+++ b/config/locales/hy-AM.yml
@@ -0,0 +1 @@
+hy.yml
\ No newline at end of file
=====================================
config/locales/hy.yml
=====================================
--- a/config/locales/hy.yml
+++ b/config/locales/hy.yml
@@ -3,7 +3,7 @@
# FIXME: This is a copy of en-US.yml. Armenian translators, please translate
# this into Armenian.
-"hy":
+hy: &hy
date:
formats:
default: "%Y-%m-%d"
@@ -222,3 +222,6 @@
<<: *errors_template
full_messages:
format: "%{attribute} %{message}"
+
+hy-AM:
+ <<: *hy
=====================================
config/locales/it.yml
=====================================
--- a/config/locales/it.yml
+++ b/config/locales/it.yml
@@ -5,7 +5,7 @@
# - Simone Carletti (weppos at weppos.net)
# - Davide Guerri (d.guerri at caspur.it)
-it:
+it: &it
number:
format:
delimiter: ","
@@ -234,3 +234,6 @@ it:
full_messages:
format: "%{attribute} %{message}"
+
+it_IT:
+ <<: *it
=====================================
config/locales/pt-BR.yml
=====================================
--- a/config/locales/pt-BR.yml
+++ b/config/locales/pt-BR.yml
@@ -1,6 +1,7 @@
# encoding: UTF-8
# pt-BR translations for Ruby on Rails
-"pt-BR":
+
+"pt-BR": &pt-BR
# formatos de data e hora
date:
formats:
@@ -231,3 +232,6 @@
full_messages:
format: "%{attribute} %{message}"
+
+pt:
+ <<: *pt-BR
=====================================
config/locales/pt.yml deleted
=====================================
--- a/config/locales/pt.yml
+++ /dev/null
@@ -1,233 +0,0 @@
-# encoding: UTF-8
-# pt-BR translations for Ruby on Rails
-"pt":
- # formatos de data e hora
- date:
- formats:
- default: "%d/%m/%Y"
- short: "%d de %B"
- long: "%d de %B de %Y"
-
- day_names:
- - Domingo
- - Segunda
- - Terça
- - Quarta
- - Quinta
- - Sexta
- - Sábado
- abbr_day_names:
- - Dom
- - Seg
- - Ter
- - Qua
- - Qui
- - Sex
- - Sáb
-
- month_names:
- - ~
- - Janeiro
- - Fevereiro
- - Março
- - Abril
- - Maio
- - Junho
- - Julho
- - Agosto
- - Setembro
- - Outubro
- - Novembro
- - Dezembro
- abbr_month_names:
- - ~
- - Jan
- - Fev
- - Mar
- - Abr
- - Mai
- - Jun
- - Jul
- - Ago
- - Set
- - Out
- - Nov
- - Dez
- order:
- - :day
- - :month
- - :year
-
- time:
- formats:
- default: "%A, %d de %B de %Y, %H:%M h"
- short: "%d/%m, %H:%M h"
- long: "%A, %d de %B de %Y, %H:%M h"
- am: ''
- pm: ''
-
- # Usado no Array.to_sentence
- support:
- array:
- words_connector: ", "
- two_words_connector: " e "
- last_word_connector: " e "
-
- select:
- prompt: "Por favor selecione"
-
- number:
- format:
- separator: ','
- delimiter: '.'
- precision: 3
- significant: false
- strip_insignificant_zeros: false
-
- currency:
- format:
- format: '%u %n'
- unit: 'R$'
- separator: ','
- delimiter: '.'
- precision: 2
- significant: false
- strip_insignificant_zeros: false
-
- percentage:
- format:
- delimiter: '.'
-
- precision:
- format:
- delimiter: '.'
-
- human:
- format:
- delimiter: '.'
- precision: 2
- significant: true
- strip_insignificant_zeros: true
- storage_units:
- format: "%n %u"
- units:
- byte:
- one: "Byte"
- other: "Bytes"
- kb: "KB"
- mb: "MB"
- gb: "GB"
- tb: "TB"
- # number_to_human()
- # new in rails 3: please add to other locales
- decimal_units:
- format: "%n %u"
- units:
- unit: ""
- thousand: "mil"
- million:
- one: milhão
- other: milhões
- billion:
- one: bilhão
- other: bilhões
- trillion:
- one: trilhão
- other: trilhões
- quadrillion:
- one: quatrilhão
- other: quatrilhões
-
- # distancia do tempo em palavras
- datetime:
- distance_in_words:
- half_a_minute: 'meio minuto'
- less_than_x_seconds:
- one: 'menos de 1 segundo'
- other: 'menos de %{count} segundos'
- x_seconds:
- one: '1 segundo'
- other: '%{count} segundos'
- less_than_x_minutes:
- one: 'menos de um minuto'
- other: 'menos de %{count} minutos'
- x_minutes:
- one: '1 minuto'
- other: '%{count} minutos'
- about_x_hours:
- one: 'aproximadamente 1 hora'
- other: 'aproximadamente %{count} horas'
- x_days:
- one: '1 dia'
- other: '%{count} dias'
- about_x_months:
- one: 'aproximadamente 1 mês'
- other: 'aproximadamente %{count} meses'
- x_months:
- one: '1 mês'
- other: '%{count} meses'
- about_x_years:
- one: 'aproximadamente 1 ano'
- other: 'aproximadamente %{count} anos'
- over_x_years:
- one: 'mais de 1 ano'
- other: 'mais de %{count} anos'
- almost_x_years:
- one: 'quase 1 ano'
- other: 'quase %{count} anos'
- prompts:
- year: "Ano"
- month: "Mês"
- day: "Dia"
- hour: "Hora"
- minute: "Minuto"
- second: "Segundo"
-
- helpers:
- select:
- prompt: "Por favor selecione"
-
- submit:
- create: 'Criar %{model}'
- update: 'Atualizar %{model}'
- submit: 'Salvar %{model}'
-
- errors:
- format: "%{attribute} %{message}"
- messages: &errors_messages
- inclusion: "não está incluído na lista"
- exclusion: "não está disponível"
- invalid: "não é válido"
- confirmation: "não está de acordo com a confirmação"
- accepted: "deve ser aceito"
- empty: "não pode ficar vazio"
- blank: "não pode ficar em branco"
- too_long: "é muito longo (máximo: %{count} caracteres)"
- too_short: "é muito curto (mínimo: %{count} caracteres)"
- wrong_length: "não possui o tamanho esperado (%{count} caracteres)"
- not_a_number: "não é um número"
- not_an_integer: "não é um número inteiro"
- greater_than: "deve ser maior que %{count}"
- greater_than_or_equal_to: "deve ser maior ou igual a %{count}"
- equal_to: "deve ser igual a %{count}"
- less_than: "deve ser menor que %{count}"
- less_than_or_equal_to: "deve ser menor ou igual a %{count}"
- odd: "deve ser ímpar"
- even: "deve ser par"
- taken: "já está em uso"
- record_invalid: "A validação falhou: %{errors}"
- template: &errors_template
- header:
- one: "Não foi possível gravar %{model}: 1 erro"
- other: "Não foi possível gravar %{model}: %{count} erros."
- body: "Por favor, verifique o(s) seguinte(s) campo(s):"
-
- activerecord:
- errors:
- messages:
- <<: *errors_messages
- template:
- <<: *errors_template
-
- full_messages:
- format: "%{attribute} %{message}"
=====================================
config/locales/pt.yml
=====================================
--- /dev/null
+++ b/config/locales/pt.yml
@@ -0,0 +1 @@
+pt-BR.yml
\ No newline at end of file
=====================================
config/locales/ru.yml
=====================================
--- a/config/locales/ru.yml
+++ b/config/locales/ru.yml
@@ -10,7 +10,7 @@
# (http://github.com/yaroslav/russian). Следующие данные -- выдержка их него, чтобы
# была возможность минимальной локализации приложения на русский язык.
-ru:
+ru: &ru
date:
formats:
default: "%d.%m.%Y"
@@ -300,3 +300,7 @@ ru:
words_connector: ", "
two_words_connector: " и "
last_word_connector: " и "
+
+ru_RU:
+ <<: *ru
+
View it on GitLab: https://gitlab.com/noosfero/noosfero/compare/a4b7f957fd55174083fc29dbec2fbf10df8ee507...abbed37f60de7abf1944fa5125cc080b2a07e1f2
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20150626/9e704436/attachment-0001.html>
More information about the Noosfero-dev
mailing list