Commit Graph

12 Commits

Author SHA1 Message Date
Andy Staudacher
4971db37d4 Fix for ticket 142: Choose plural form "other" for count == 0 (unless the locale has a specific plural form for zero) 2009-03-18 02:40:16 +00:00
Andy Staudacher
c5964c74cd Fix i18n create table sql (forgot to change core_install.php) 2009-02-24 06:10:40 +00:00
Andy Staudacher
50b783e3a5 Change i18n message key to include the plural form (to ensure that it's truly unique). 2009-02-12 07:11:24 +00:00
Andy Staudacher
b2f20ff766 style fixes (style for method names, style for vars in locale.php) 2009-02-10 06:12:16 +00:00
Andy Staudacher
dce6548431 Add local localization functionality. Local = no means to upload / download translations to a translation server yet.
- Added an outgoing_translations table to store translations from the local translation UI.
 - I18n class is checking incoming_ and outgoing_translations for translations, giving the latter priority.
 - Not handling plural strings in the translations UI yet.
2009-02-09 08:42:13 +00:00
Andy Staudacher
fa1f49d99a Adding translation UI. Not backed by any model yet (submissions are ignored).
The code is based on the l10n_client module from Drupal 6, by Gabor Hojtsy (http://drupal.org/user/4166).
2009-02-09 07:29:24 +00:00
Tim Almdal
3b944bca5d Use the ORM method delete_all to remove selected records from the
database instead of calling the Database::query with raw sql.
2009-02-08 18:03:31 +00:00
Andy Staudacher
e4a9b19bf9 Changing t() placeholder syntax from {{replace_me}} to %replace_me. 2009-01-15 10:02:41 +00:00
Bharat Mediratta
ff6791f576 Models should be named in adjective_noun form to make pluralizatoin
more intuitive.

Renamed Translations_Incoming to Incoming_Translation to suit.
2009-01-13 01:05:11 +00:00
Andy Staudacher
a631fe29f3 i18n refactoring: Rename all _() (reserved by gettext) calls to t().
- And refactor printf to our string interpolation / pluralization syntax
- Also, a slight change to the translations_incomings table, using binary(16) instead of char(32) as message key.
2009-01-08 17:13:06 +00:00
Andy Staudacher
2917740ba6 First step of i18n refactoring:
- Using DB table translations_incomings as translations storage (file cache to be added)
- Removed overly complex i18n code which will be unnecessary with the future compiled cache files
- Added t() as a translation function (global refactoring from _() to t() to follow)
2009-01-08 06:52:18 +00:00
Andy Staudacher
66f51f3c17 Initial commit of the translation class, I18n_Core and some tests.
- Port of Ruby's I18n gem (http://rails-i18n.org/)
- Added proper plural handling on top of that.
- Using CLDR 1.6's plural form data
- See I18n_Test for example usage.
- Not integrated into G3 templates yet. Probably adding __() as alias for I18n::instance->translate().
- No specific plan yet where localization files should live.
2008-11-26 11:46:56 +00:00