forked from consuldemocracy/consuldemocracy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request consuldemocracy#1718 from consul/migrate_locales
Migrate localization files & Prepare Crowdin
- Loading branch information
Showing
85 changed files
with
60 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
0
config/locales/admin.en.yml → config/locales/en/admin.yml
100755 → 100644
File renamed without changes.
File renamed without changes.
0
config/locales/devise.en.yml → config/locales/en/devise.yml
100755 → 100644
File renamed without changes.
File renamed without changes.
0
config/locales/en.yml → config/locales/en/general.yml
100755 → 100644
File renamed without changes.
0
config/locales/kaminari.en.yml → config/locales/en/kaminari.yml
100755 → 100644
File renamed without changes.
File renamed without changes.
0
config/locales/mailers.en.yml → config/locales/en/mailers.yml
100755 → 100644
File renamed without changes.
File renamed without changes.
0
config/locales/moderation.en.yml → config/locales/en/moderation.yml
100755 → 100644
File renamed without changes.
File renamed without changes.
0
config/locales/pages.en.yml → config/locales/en/pages.yml
100755 → 100644
File renamed without changes.
File renamed without changes.
0
config/locales/responders.en.yml → config/locales/en/responders.yml
100755 → 100644
File renamed without changes.
0
config/locales/settings.en.yml → config/locales/en/settings.yml
100755 → 100644
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
0
config/locales/es.yml → config/locales/es/general.yml
100755 → 100644
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
0
config/locales/admin.nl.yml → config/locales/nl/admin.yml
100755 → 100644
File renamed without changes.
File renamed without changes.
0
config/locales/devise.nl.yml → config/locales/nl/devise.yml
100755 → 100644
File renamed without changes.
File renamed without changes.
0
config/locales/nl.yml → config/locales/nl/general.yml
100755 → 100644
File renamed without changes.
0
config/locales/kaminari.nl.yml → config/locales/nl/kaminari.yml
100755 → 100644
File renamed without changes.
0
config/locales/mailers.nl.yml → config/locales/nl/mailers.yml
100755 → 100644
File renamed without changes.
File renamed without changes.
0
config/locales/moderation.nl.yml → config/locales/nl/moderation.yml
100755 → 100644
File renamed without changes.
File renamed without changes.
0
config/locales/pages.nl.yml → config/locales/nl/pages.yml
100755 → 100644
File renamed without changes.
File renamed without changes.
0
config/locales/responders.nl.yml → config/locales/nl/responders.yml
100755 → 100644
File renamed without changes.
0
config/locales/settings.nl.yml → config/locales/nl/settings.yml
100755 → 100644
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,16 @@ | ||
files: | ||
- source: /config/locales/*.en.yml | ||
translation: /config/locales/%two_letters_code%/%original_file_name% | ||
- source: /config/locales/en/**.yml | ||
translation: /config/locales/%locale%/%original_file_name% | ||
languages_mapping: | ||
locale: | ||
ar: ar | ||
ast: ast | ||
ca: ca | ||
es-ES: es | ||
fr: fr | ||
gl: gl | ||
he: he | ||
it: it | ||
nl: nl | ||
pt-PT: pt | ||
ru: ru |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
namespace :locales do | ||
desc 'Migrate all localization files to new structure for a given locale name as argument' | ||
task :migrate_structure, [:locale] => [:environment] do |_t, args| | ||
locale = args[:locale] | ||
puts "Moving files for locale: #{locale}" | ||
|
||
# This creates ./config/locales/en/ directory | ||
system "mkdir ./config/locales/#{locale}" | ||
|
||
# This moves from ./config/locales/en.yml to ./config/locales/en/general.yml | ||
system "mv ./config/locales/#{locale}.yml ./config/locales/#{locale}/general.yml" | ||
|
||
# This moves from ./config/locales/admin.en.yml to ./config/locales/en/admin.en.yml | ||
system "mv ./config/locales/*.#{locale}.yml ./config/locales/#{locale}/" | ||
|
||
# This moves from ./config/locales/en/admin.en.yml to ./config/locales/en/admin.yml | ||
system "find ./config/locales/ -name \"*.#{locale}.yml\" -exec sh -c 'mv \"$1\" \"${1%.#{locale}.yml}.yml\"' _ {} \\;" | ||
|
||
puts "Moved!" | ||
end | ||
end | ||
|