Browsing projects by Tag(s)

Select a tag to browse associated projects and drill deeper into the tag cloud.

Showing page 1 of 1

asgettext is Ruby-script simplifying the use of gettext with Flex applications. This is ruby script managing the translation file generation for you. It is a wrapper for the GNU-gettext. Creating multilingual Flex application sucks, since there are no standard tools out there. gettext has ... [More] been there for many years. The tools provided by gettext are easy to use but require a bit more detailed knowledge of the whole translation process. Another problem is the duality of Flex source files, gettext does not work well on mxml source-files, the mixture of actioscript and xml has not been added to gettext as source type. asgettext helps extracting translation strings from mxml and as source files managing the translation files (.po, .pot and .mo) asgettext is Ruby-script using gettext. [Less]

0
 
  0 reviews  |  1 user  |  813 lines of code  |  0 current contributors  |  Analyzed 5 days ago
 
 

This package brings you useful utility and library which can help you to handle locale files and translations in your Ruby projects. Offers also built-in simple console editor. Read README.md file and run i18n-translate without parameters for more information.

0
 
  0 reviews  |  1 user  |  2,091 lines of code  |  0 current contributors  |  Analyzed 8 days ago
 
 

This is very simple project-based application written in ruby for translating locales using i18n-translators-tools. Interesting features * various formats support (yml, rb, po, ts, properties) * nested directories * no database required * various scenarios possible (e.g: you can have default file in yaml and other locales in po).

0
 
  0 reviews  |  1 user  |  713 lines of code  |  0 current contributors  |  Analyzed 8 days ago
 
 

PluralizeForGettextThis plugin inspects a single string to get pluralization with substitution. The reason I use a single string is to keep it recognizable for gettext or similar i12n plugins. Although I created this plugin for gettext, it can be used whenever you like. If you're not using ... [More] gettext, _("string").pluralize_for becomes "string".pluralize_for... Simple enough... Please visit http://infx.nl for more information and updates Installation./script/plugin install http://pluralize-for-gettext.googlecode.com/svn/trunk/And then rename vendor/plugins/svn to vendor/plugins/pluralize_for_gettext ExamplesA bit better looking: <%=_('No posts ~~ Only one post ~~ You have {$N} posts!').pluralize_for(Post.count) %>Clearer for the translator: <%=_('~~$N==0: No posts ~~$N==1: Only one post ~~else: You have {$N} posts').pluralize_for(Post.count)%>Note: The translator can change the logic for this, for languages with weird pluralization rules. ;) Caution: It's being eval'ed, so always check language files (or ruby code) for any Ruby injections. Substituting more variablesWhy not use the default sprintf-like function from rails? <%_('You have %d posts, view %s') % [ Post.count, link_to(_('more'), view_more_url)%>You'd get multiple entries in you .po file, and just 'more' can't be translated differently according to the context. More advanced, for entering links <%=_('No posts, create one by clicking {1:here} ~~ Only one post ~~ You have {$N} posts ~~$N>6: You have {$N} posts, view {2:more}').pluralize_for(Post.count) do |i| i[1] = link_to(i[1], create_post_url) if i[1] i[2] = link_to(i[2], view_more_url) if i[2] %>In the .po file: #: app/controllers/some_controller.rb:102 msgid "No posts, create one by clicking {1:here} ~~ Only one post ~~ You have {$N} posts ~$N>6~ You have {$N} posts, view {2:more}" msgstr "Geen artikelen, {1:plaats een artikel} ~~ Slechts een artikel ~~ Je hebt {$N} artikelen ~$N>6~ Je hebt {$N} artikelen ({2:bekijk meer...})"The numbers in {1:foo} are the keys for the array you're given. You can adjust it anyway you like. Simple pluralizationsPerhaps you just want to specify a singular and plural for one word in the entire sentence: <%=_('You have {$N} {post|posts}').pluralize_for(Post.count)%>English is simpler than many other languages, so the translator could change it into the more elaborate version: #: app/controllers/some_controller.rb:102 msgid "You have {$N} {post|posts}" msgstr "~~$N==0: Helemaal geen artikelen ~~$N==1: U heeft een artikel ~~$N>1: U heeft {$N} artikelen" [Less]

0
 
  0 reviews  |  0 users  |  0 current contributors
 
 
 
 

Creative Commons License Copyright © 2013 Black Duck Software, Inc. and its contributors, Some Rights Reserved. Unless otherwise marked, this work is licensed under a Creative Commons Attribution 3.0 Unported License . Ohloh ® and the Ohloh logo are trademarks of Black Duck Software, Inc. in the United States and/or other jurisdictions. All other trademarks are the property of their respective holders.