renuo / i18n-docs Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
I use some concerns, e.g. Addressable, in my code and would like to avoid having these (repeated) fields appear many times in my translations speadsheet. I want to use YAML aliases to achieve this and so I'd like to have those aliases in the Google Doc and have them imported correctly.
I would like my final YAML to look as follows:
en:
aaa:
tables: &table Table
activerecord:
concerns:
addressable: &addressable
address: Address
logoable: &logoable
logo: Logo
models:
some_model:
table: *table
Note table alias has a value on the same line, whereas addressable includes everything below it.
To achieve that, my google doc to looks as follows:
key | en | de |
---|---|---|
aaa.tables | &table Table | &table Tabelle |
activerecord.concerns.addressable | &addressable | &addressable |
activerecord.concerns.addressable.address | Address | Addresse |
activerecord.concerns.logoable | &logoable | &logoable |
activerecord.concerns.logoable.logo | Logo | Logo |
activerecord.models.some_model.table | *table | *table |
So it's possible to use these lines as comments / descriptive separations
My application is in German and French. I don't want to create a english file structure just to be able to translate.
test어렵
%{name} is not a datatype
Would be great if the document doesn't have to be published.
One possibility would be to use the gem google-drive-ruby
I just tried to use this handy gem to edit translations via google docs - seems to be very good work! I have one problem with the approach of translations.yml
: As far as I understand the code/ docs, i18n-docs forces me to use subdirectories like config/locales/:locale/*.yml
. Different projects I am working for are using different directory structures, e.g. one big config/locales/:locale.yml
or something like config/locales/mail/:locale.yml
.
I would like propose a different approach for specifying relevant files translations.yml
. What do you think about something like:
files:
# config/locales/en.yml, config/locales/de.yml, ...
:locale.yml: "http://docs.google.com/doc1"
# config/locales/en/navigation.yml, config/locales/de/navigation.yml, ...
:locale/navigation.yml: "http://docs.google.com/doc2"
Using :locale
as a placeholder for de|en|ru|...
should provide much more flexibility. What do you think about this approach? Is it worth in your opinion that I start working on this?
sv-SE is a valid locale, but things get downcased, which results in sv-se and an error
For some reason I get this error now (using bundler 1.1.3)
gems/bundler-1.1.3/lib/bundler/runtime.rb:74:in `require': no such file to load -- i18n/docs (LoadError)
from /Users/kmandrup/.rvm/gems/ruby-1.8.7-p358@global/gems/bundler-1.1.3/lib/bundler/runtime.rb:74:in `require'
from /Users/kmandrup/.rvm/gems/ruby-1.8.7-p358@global/gems/bundler-1.1.3/lib/bundler/runtime.rb:55:in `each'
from /Users/kmandrup/.rvm/gems/ruby-1.8.7-p358@global/gems/bundler-1.1.3/lib/bundler/runtime.rb:55:in `require'
from /Users/kmandrup/.rvm/gems/ruby-1.8.7-p358@global/gems/bundler-1.1.3/lib/bundler.rb:119:in `require'
from /Users/kmandrup/work/repos/circle/htc_one/config/application.rb:13
I resolved it by explicitly declaring which file to require.
`gem 'i18n-docs', '~> 0.1.2', :require => 'i18n-docs'``
Very strange indeed!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.