stefanoverna / vim-i18n Goto Github PK
View Code? Open in Web Editor NEWVim plugin to easily add I18n translations to your Rails project
Vim plugin to easily add I18n translations to your Rails project
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.
e.g.
t('view.users.profile.more_info')
won't load translation from config/locales/views/users
It should get a translation key between quotation marks, '
or "
and look for its value.
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!
I was just navigating with {
}
when I saw the empty lines were all gone. Not good.
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!
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.