Translation system refactoring

Components

Description

Currently phrases and email event translations are stored for each language separately, so adding new language creates twice more records to Phrase and EmailMessage tables. Also after that same phrase/email event translation have different id for different languages and this enlarges amount of cached data.

I propose to make Translation column (in Phrase table) and Template/Subject columns (in EmailMessage table) multilingual. This way record count in Phrase and EmailMessage tables will be equals to actual phrase and email event count in system.

There also side benefit of that: in cases, when phrase is not translated in given language, then we still could show it's translation from primary language. This is better, then show "

" on Front-End at least.

After proposed refactoring is made, then "Configuration -> Website -> Regional" section can no longer exist, because each record in Phrase/EmailMessage table will represent all languages at once. This should lead to making "phrases" and "emailmessages" prefixes no subitems of "lang" prefix, but self sufficient entities with their own grid/edit templates.

There are "Website & Content -> Phrases & Labels" and "Website & Content -> Email Messages" separate grids for that purpose. They will be transformed to show translations from all languages in one record.

Context Information

None

Additional information (do not use)

None

Attachments

11

Activity

Alex 
July 22, 2010 at 8:06 PM

Closing, since 5.1.0 release has been released.

Alex 
April 28, 2010 at 9:53 AM

Patch "missing_label_translation_links.patch" (already commited) fixes problem, that missing label translation links were missing in case when ALL of labels on current form were not translated.

How to reproduce:
1. visit form on language, where all labels are translated (used label ids will be stored to cache)
2. create new language with no phrases translated
3. visit same template again.

Problem was in place, because phrases were restored by IDs no matter if they were translated or not.

Alex 
April 26, 2010 at 7:48 PM

Dmitry asked me to test his patch, what I did.

Dmitry Andrejev 
April 26, 2010 at 11:31 AM

Thanks for your reply.

1. Please review and commit my patch.

2. New bug has been created

Language system is not using available LanguageId when new language is added

Alex 
April 26, 2010 at 9:50 AM

== There are two little bugs in this task ==
Ok.

== Answers to questions ==
a - yes, when language is deleted, then none of translated values on that language are deleted from database. This is done for case, when administrator deletes language by accident and then wants his data back.

b - this a bug. New language ID generator should re-use empty places in existing language ID interval

Fixed

Details

Priority

Assignee

Reporter

Developer

Change Log Message

External issue ID

External issue URL

Fix versions

Patch Instructions

Patches must be submitted through Phabricator.

Created September 13, 2009 at 5:55 PM
Updated December 30, 2024 at 2:05 AM
Resolved July 22, 2010 at 8:06 PM