On Tue, 3 Jul 2012 22:21:46 +0200 Roger Martín <rg1...@gmail.com> wrote:
> 2012/6/13 Jakub Jankiewicz <jcu...@onet.pl> > > > There are 3 language system L10N (aiki_dictionary) Getext using > > files for upgrader and installer and new system use in Aiki > > (aiki_dictionaries). > > > > > L10N was the first translation system, and imho, we can remove it. > Gettext using files is necessary for installer, who runs over a empty > database, and is more secure in upgrader. Agree, but we should use aiki_languages for new system, remove those comma separated mnemonics from aiki_sites, and for aiki_dictionaries remove lanague mnemonics and use foreign keys to aiki_languages. For intance one stupid thing is that on OFLB select box use aiki_languages even if it's not used by the system, so if I want to add another language I need to add it into two places. and one thing aiki_language need to have localized name of the language, we use that like Deutsch or Français and system_name can be removed since we don't use the system, we just reuse the table. > > The tables can be improved, but it's not necessary. Translation > system uses functions that abstract how the system work: over one > table, over two..over a gettext file. > In resume, we only need to change lines 45-54 of > libs/classes/dictionaryTableClass,php to improve table and structure. > For example: > we change aiki_terms as term_id, and term (varchar): 1, "hello", > aiki_diciontionary contains terms translation as term_id, to, > translation: 1,"de","hallo" > then we need replace line 48 of file to (aprox..) > $SQL = > "SELECT translation ". > " FROM aiki_terms INNER JOIN aiki_dictionary USING > term_id=dictionary_term_id. > " WHERE term='$search' " AND to='{$this->to}';... > does new system use aiki_dictionary? I thought that it only use aiki_dictionaries, (I didn't read language code). > Note that sql searchs over a index field are very fast. So, terms > must be varchar not text. It need to be text because we use larger strings, varchar is too small. Sometimes we need to translate full pages. like content of the page is in database and it's text. -- www: http://jcubic.pl twitter: http://twitter.com/jcubic blog: http://jcubic.wordpress.com _______________________________________________ Mailing list: https://launchpad.net/~aikiframework-devel Post to : aikiframework-devel@lists.launchpad.net Unsubscribe : https://launchpad.net/~aikiframework-devel More help : https://help.launchpad.net/ListHelp