Code Monkey home page Code Monkey logo

vim-i18n's People

Contributors

calebhearth avatar guipdutra avatar rubemz avatar simon2k avatar sktocha avatar stansidel avatar stefanoverna avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

vim-i18n's Issues

Allow relativ keys for nested views

I tried to add relative translations for my view in app/views/admin/users/index.html.erb but instead of admin.users.index i got users.index for a key.

The command is not available in this version: ruby << EOF

Hello,

I just made an update of vim-i18n and I have this error :

    Erreur détectée en traitant /home/dougui/.dotfiles/.vim/bundle/vim-i18n/plugin/i18n.vim :
    ligne   35 :
    E319: The command is not available in this version: ruby << EOF
    ligne   36 :
    E492: Commande inconnue: require 'yaml'
    ligne   38 :
    E492: Commande inconnue: def get_translation(translation_key, file_name)
    ligne   39 :
    E492: Commande inconnue:   locale = file_name.match(/(?<locale>\w+[-_]?\w+)\.yml$/)[:locale]
    ligne   40 :
    E492: Commande inconnue:   translations_hash = load_yaml(file_name)
    ligne   41 :
    E492: Commande inconnue:   translation = get_deep_value_for(translations_hash, "#{locale}.#{translation_key}")
    ligne   42 :
    E488: Caractères surnuméraires:   print translation
    ligne   43 :
    E580: :endif sans :if: end
    ligne   45 :
    E492: Commande inconnue: def load_yaml(file_name)
    ligne   46 :
    E492: Commande inconnue:   begin
    ligne   47 :
    E492: Commande inconnue:     YAML.load(File.open(file_name))
    ligne   48 :
    E492: Commande inconnue:   rescue
    ligne   49 :
    E492: Commande inconnue:     raise "There's a problem with parsing translations from the file: #{file_name}"
    ligne   50 :
    E580: :endif sans :if:   end
    ligne   51 :
    E580: :endif sans :if: end
    ligne   53 :
    E492: Commande inconnue: def get_deep_value_for(hash, key)
    ligne   54 :
    E133: :return en dehors d'une fonction
    ligne   55 :
    E488: Caractères surnuméraires
    ligne   56 :
    E163: Il n'y a qu'un seul fichier à éditer
    ligne   57 :
    E492: Commande inconnue:   segment_tail_of_key = keys.join('.')
    ligne   58 :
    E492: Commande inconnue:   value = hash[first_segment_of_key]
    ligne   60 :
    E133: :return en dehors d'une fonction
    ligne   61 :
    E492: Commande inconnue:   get_deep_value_for(value, segment_tail_of_key)
    ligne   62 :
    E580: :endif sans :if: end
    ligne   63 :
    E492: Commande inconnue: EOF
    ligne   35 :
    E319: The command is not available in this version: ruby << EOF
    ligne   36 :
    E492: Commande inconnue: require 'yaml'
    ligne   38 :
    E492: Commande inconnue: def get_translation(translation_key, file_name)
    ligne   39 :
    E492: Commande inconnue:   locale = file_name.match(/(?<locale>\w+[-_]?\w+)\.yml$/)[:locale]
    ligne   40 :
    E492: Commande inconnue:   translations_hash = load_yaml(file_name)
    ligne   41 :
    E492: Commande inconnue:   translation = get_deep_value_for(translations_hash, "#{locale}.#{translation_key}")
    ligne   42 :
    E488: Caractères surnuméraires:   print translation
    ligne   43 :
    E580: :endif sans :if: end
    ligne   45 :
    E492: Commande inconnue: def load_yaml(file_name)
    ligne   46 :
    E492: Commande inconnue:   begin
    ligne   47 :
    E492: Commande inconnue:     YAML.load(File.open(file_name))
    ligne   48 :
    E492: Commande inconnue:   rescue
    ligne   49 :
    E492: Commande inconnue:     raise "There's a problem with parsing translations from the file: #{file_name}"
    ligne   50 :
    E580: :endif sans :if:   end
    ligne   51 :
    E580: :endif sans :if: end
    ligne   53 :
    E492: Commande inconnue: def get_deep_value_for(hash, key)
    ligne   54 :
    E133: :return en dehors d'une fonction
    ligne   55 :
    E488: Caractères surnuméraires
    ligne   56 :
    E163: Il n'y a qu'un seul fichier à éditer
    ligne   57 :
    E492: Commande inconnue:   segment_tail_of_key = keys.join('.')
    ligne   58 :
    E492: Commande inconnue:   value = hash[first_segment_of_key]
    ligne   60 :
    E133: :return en dehors d'une fonction
    ligne   61 :
    E492: Commande inconnue:   get_deep_value_for(value, segment_tail_of_key)
    ligne   62 :
    E580: :endif sans :if: end
    ligne   63 :
    E492: Commande inconnue: EOF

The error was not present before the update an hour ago.

Tanks!

Add keys to all locales

Hi everyone,

maybe there is an option to do this, but I didn't find it in the readme:

Background: When I add a translation key to my app, I do it in order to translate a text into multiple languages, so the key has to be in all the locale files in my app.

To do: Instead of asking for a locale where to include the key, add the key to all locale files.

Thanks!

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.