Commit 8ce141bf authored by Yamagishi Kazutoshi's avatar Yamagishi Kazutoshi Committed by Eugen Rochko

Intoroduce i18n-tasks

parent 522e46ed
......@@ -30,6 +30,7 @@ gem 'react_on_rails', '11.0.0'
group :development, :test do
gem 'pry-rails', '~> 0.3'
gem 'i18n-tasks', '~> 0.9', require: false
end
group :development do
......
......@@ -76,6 +76,7 @@ GEM
addressable (2.5.2)
public_suffix (>= 2.0.2, < 4.0)
arel (9.0.0)
ast (2.4.0)
bcrypt (3.1.12)
better_errors (2.4.0)
coderay (>= 1.0.0)
......@@ -111,6 +112,9 @@ GEM
dotenv-rails (2.4.0)
dotenv (= 2.4.0)
railties (>= 3.2, < 6.0)
easy_translate (0.5.1)
thread
thread_safe
equalizer (0.0.11)
erubi (1.7.1)
execjs (2.7.0)
......@@ -130,6 +134,7 @@ GEM
hamlit (>= 1.2.0)
railties (>= 4.0.1)
hashie (3.5.7)
highline (2.0.0)
hiredis (0.6.1)
http (3.3.0)
addressable (~> 2.3)
......@@ -146,6 +151,16 @@ GEM
rack
i18n (1.0.1)
concurrent-ruby (~> 1.0)
i18n-tasks (0.9.21)
activesupport (>= 4.0.2)
ast (>= 2.1.0)
easy_translate (>= 0.5.1)
erubi
highline (>= 1.7.3)
i18n
parser (>= 2.2.3.0)
rainbow (>= 2.2.2, < 4.0)
terminal-table (>= 1.5.1)
jsonapi-renderer (0.2.0)
jwt (1.5.6)
libv8 (6.3.292.48.1)
......@@ -206,6 +221,8 @@ GEM
omniauth-oauth (~> 1.1)
rack
orm_adapter (0.5.0)
parser (2.5.1.0)
ast (~> 2.4.0)
pg (0.21.0)
pry (0.11.3)
coderay (~> 1.1.0)
......@@ -306,7 +323,10 @@ GEM
activesupport (>= 4.0)
sprockets (>= 3.0.0)
temple (0.8.0)
terminal-table (1.8.0)
unicode-display_width (~> 1.1, >= 1.1.1)
thor (0.20.0)
thread (0.2.2)
thread_safe (0.3.6)
tilt (2.0.8)
tzinfo (1.2.5)
......@@ -314,6 +334,7 @@ GEM
unf (0.1.4)
unf_ext
unf_ext (0.0.7.5)
unicode-display_width (1.4.0)
warden (1.2.7)
rack (>= 1.0)
webpacker (3.5.3)
......@@ -341,6 +362,7 @@ DEPENDENCIES
http
http_accept_language (~> 2.1)
httplog (~> 0.99)
i18n-tasks (~> 0.9)
listen (~> 3.0.5)
lograge
mastodon-api!
......
# i18n-tasks finds and manages missing and unused translations: https://github.com/glebm/i18n-tasks
# The "main" locale.
base_locale: en
## All available locales are inferred from the data by default. Alternatively, specify them explicitly:
# locales: [es, fr]
## Reporting locale, default: en. Available: en, ru.
# internal_locale: en
# Read and write translations.
data:
## Translations are read from the file system. Supported format: YAML, JSON.
## Provide a custom adapter:
# adapter: I18n::Tasks::Data::FileSystem
# Locale files or `File.find` patterns where translations are read from:
read:
- config/locales/%{locale}.yml
- config/locales/client/%{locale}.yml
# Locale files to write new keys to, based on a list of key pattern => file rules. Matched from top to bottom:
# `i18n-tasks normalize -p` will force move the keys according to these rules
write:
## For example, write devise and simple form keys to their respective files:
# - ['{devise, simple_form}.*', 'config/locales/\1.%{locale}.yml']
## Catch-all default:
- config/locales/%{locale}.yml
- config/locales/client/%{locale}.yml
# External locale data (e.g. gems).
# This data is not considered unused and is never written to.
external:
## Example (replace %#= with %=):
# - "<%#= %x[bundle show vagrant].chomp %>/templates/locales/%{locale}.yml"
## Specify the router (see Readme for details). Valid values: conservative_router, pattern_router, or a custom class.
# router: conservative_router
yaml:
write:
# do not wrap lines at 80 characters
line_width: -1
## Pretty-print JSON:
# json:
# write:
# indent: ' '
# space: ' '
# object_nl: "\n"
# array_nl: "\n"
# Find translate calls
search:
## Paths or `File.find` patterns to search in:
paths:
- app/
## Root directories for relative keys resolution.
relative_roots:
- app/controllers
- app/helpers
- app/mailers
- app/views
## Files or `File.fnmatch` patterns to exclude from search. Some files are always excluded regardless of this setting:
## %w(*.jpg *.png *.gif *.svg *.ico *.eot *.otf *.ttf *.woff *.woff2 *.pdf *.css *.sass *.scss *.less *.yml *.json)
exclude:
- app/assets/images
- app/assets/fonts
- app/assets/videos
## Alternatively, the only files or `File.fnmatch patterns` to search in `paths`:
## If specified, this settings takes priority over `exclude`, but `exclude` still applies.
# only: ["*.rb", "*.html.slim"]
## If `strict` is `false`, guess usages such as t("categories.#{category}.title"). The default is `true`.
# strict: true
## Multiple scanners can be used. Their results are merged.
## The options specified above are passed down to each scanner. Per-scanner options can be specified as well.
## See this example of a custom scanner: https://github.com/glebm/i18n-tasks/wiki/A-custom-scanner-example
## Google Translate
# translation:
# # Get an API key and set billing info at https://code.google.com/apis/console to use Google Translate
# api_key: "AbC-dEf5"
## Do not consider these keys missing:
# ignore_missing:
# - 'errors.messages.{accepted,blank,invalid,too_short,too_long}'
# - '{devise,simple_form}.*'
## Consider these keys used:
ignore_unused:
- 'friends.*'
- 'connect_prompt.*'
## Exclude these keys from the `i18n-tasks eq-base' report:
# ignore_eq_base:
# all:
# - common.ok
# fr,es:
# - common.brand
## Ignore these keys completely:
# ignore:
# - kaminari.*
## Sometimes, it isn't possible for i18n-tasks to match the key correctly,
## e.g. in case of a relative key defined in a helper method.
## In these cases you can use the built-in PatternMapper to map patterns to keys, e.g.:
#
# <%# I18n::Tasks.add_scanner 'I18n::Tasks::Scanners::PatternMapper',
# only: %w(*.html.haml *.html.slim),
# patterns: [['= title\b', '.page_title']] %>
#
# The PatternMapper can also match key literals via a special %{key} interpolation, e.g.:
#
# <%# I18n::Tasks.add_scanner 'I18n::Tasks::Scanners::PatternMapper',
# patterns: [['\bSpree\.t[( ]\s*%{key}', 'spree.%{key}']] %>
......@@ -15,7 +15,7 @@ de:
find_more: Finde mehr auf
follow_all: Folge allen Freunden auf Mastodon
headline: Deine Freunde
num_users: '{formatted_count} {count, plural, eine {person} andere {people}}'
num_users: "{formatted_count} {count, plural, eine {person} andere {people}}"
searching:
headline: Auf der Suche nach deinen Freunden...
subheadline: Bitte warte, während nach deinen Twitter-Freunden gesucht wird
......
......@@ -15,7 +15,7 @@ en:
find_more: Find more on
follow_all: Follow all friends on Mastodon
headline: Your friends
num_users: '{formatted_count} {count, plural, one {person} other {people}}'
num_users: "{formatted_count} {count, plural, one {person} other {people}}"
searching:
headline: Searching for your friends...
subheadline: Please wait while your Twitter friends are being fetched
......
......@@ -15,7 +15,7 @@ ja:
find_more: もっと探す
follow_all: 友だちを全員Mastodonでフォローする
headline: あなたの友だち
num_users: '{formatted_count}人'
num_users: "{formatted_count}人"
searching:
headline: あなたの友だちを探しています...
subheadline: あなたのTwitterの友だちの情報が取得されている間お待ちください
......@@ -23,4 +23,3 @@ ja:
your_friends_instance:
headline: あなたの友だちのインスタンス
subheadline: 'あなたの友だちが使っているサーバーは次の通りです:'
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment