Code Monkey home page Code Monkey logo

i18n-docs's Issues

Ability to use YAML aliases

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

Make it possible to use en.yml without subdirectories

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?

Don't downcase locale

sv-SE is a valid locale, but things get downcased, which results in sv-se and an error

no such file to load -- i18n/docs

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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.