In-Portal Issue Tracker

Welcome to the In-Portal Open Source CMS Issue Tracker! This is a central management / tracking tool for all types of tasks / issues / bugs for the In-Portal Project. Before reporting any issues, please make sure to read the Guide into Issue Tracker and How to Properly Test and Report Bugs!

Viewing Issue Simple Details Jump to Notes ] Wiki ]  Related Changesets ] View Advanced ] Issue History ] Print ]
ID Category Type Reproducibility Date Submitted Last Update
0001023 [In-Portal CMS] Localization feature request N/A 2011-03-13 08:14 2012-10-17 05:53
Reporter alex View Status public Project Name In-Portal CMS
Assigned To Developer
Priority normal Resolution open Fixed in Version
Status active Product Version Target Version 5.3.0
Time EstimateNo estimate
Summary 0001023: Ability to Keep Language Packs in Sync
Description 1. Tracking Changes

I've imagined that such (or alike) translation system would also be useful for In-Portal websites, who are translated into multiple languages to keep all phrases/e-mails in sync between languages.


a. Add "TranslateFrom" ML column into LanguageLabels (former "Phrases") and EmailEvents (former "Events") database tables
b. Add "Use as Primary" button on phrase/e-mail event edit page (with hint "Use this translation as primary for other languages")
Initially all TranslateFrom columns have 0 in them, that means - "I'm in sync".
c. As you probably noticed user then can press either "Save" or "Use as Primary" button after changing a translation on a specific language he is assigned to translate.


Pressing "Use as Primary" would save phrase/e-mail event translation and set this language ID to TranslateFrom field for all other languages except current one:
l1_TranslateFrom = 3
l2_TranslateFrom = 3
l3_TranslateFrom = 0
l4_TranslateFrom = 3
l5_TranslateFrom = 3
In example above you can easily see, that translation was changed on 3rd language and all other languages needs to be updated to be in sync.


Pressing "Save" would set 0 to TranslateFrom column at current language only, like in example below:
l1_TranslateFrom = 3
l2_TranslateFrom = 3
l3_TranslateFrom = 0
l4_TranslateFrom = 3
l5_TranslateFrom = 0
Here 5th language translation was fixed to be in sync and 0 was set in corresponding field.


Then in phrase/e-mail event list we create column "Translation in Sync" (Yes/No), where we would just compare TranslateFrom column from current language with 0. If it's 0, then all is translated.

On phrase editing page we'll show translation form language indicated in TranslateFrom column and not from primary language. Of course if TranslateFrom = 0, then we can fallback to translation from primary language.

Also I've noticed that we're not showing translation from primary language on e-mail event editing, which makes it harder to translate them.


2. Sync Status in %

Propose another grid column in Regional Configuration menu, called "sync status", where we could display % of
synced labels, for reporting purposes.

SUM(IF(l5_TranslateFrom = 0, 0, 1)) / COUNT(l5_TranslateFrom).

SUM(IF(l5_TranslateFrom = 0, 1, 0)) - phrase count, that doesn't require to be synced
COUNT(l5_TranslateFrom) - total phrase count

In total we'll have following Sync columns:
- "Front-End / Both Labels"
- "Admin Labels"
- "Front-End E-mail Events"
- "Admin E-mail Events"


3. Percentages of Content Block Translation

Create a "Scheduled Task" (former "Agent"), that would count % of translated content blocks for each page, which has them. It of course won't allow to track outdated translations as with phrases, but it at least would tell what content blocks aren't translated at all on other languages.

Add multilingual (one column per language) TranslatedContentBlocks column to Categories database table. For each language execute this SQL to fill it:

SELECT SUM( IF(COALESCE(l1_Content, '') = '', 0, 1) ), PageId
FROM PageContent
GROUP BY PageId

Additional Information ORIGINAL IDEA (replaced with new in May-2012)


Here is some ideas how we can keep language packs from multiple languages synchronized with primary language pack for English language.

We invent such term as translatable unit. Units could consist of one or more fields (textareas) that could be translated. Also translatable unit will feature a Description field, that will tell translator, where exactly given text will be used, so translation could be more accurate and appropriate. Each translatable unit have unique identifier (phrase name for phrases and email event name + email event type for email events). Each translatable unit have version number (integer). Once primary language translation is updated or new translation unit is added, then it's version number is incremented.

When we perform translation of set of the translatable units (language pack) to other language, then each unit will keep it's version, version used to make initial translation). When primary unit translation (on English language) will be changed, then it's version number will changed and will differ from all other translated units in other language packs. This way we can detect translation units, that need to be updated to be in sync.

I suppose, that this will be some script on http://www.in-portal.com website. Each website user can register as "translator" for any count of languages so he'll get notified when his expertise is need to keep associated language pack in sync. Page with language packs will be automatically constructed based on finished translation for each language pack and translation progress bar will available for each language pack.

I'll try to look if something, that I've described is already available on the Internet, if not will write something myself.

Here is how Drupal does that: http://localize.drupal.org/translate?no_cache=1265705125.

We can expand this idea to site upgrade so we will track what phrases, email events user have changed and what of there were changed on original language pack in new version of In-Portal and overwrite only not touched by the user.

Tags No tags attached.
Reference https://groups.google.com/d/topic/in-portal-local/Y44XAWlz0AU/discussion
Change Log Message Added functionality to Keep Language Packs in Sync
Estimate Points 2
Attached Files patch file icon improved_translation_interface_part1_core.patch [^] (112,884 bytes) 2012-10-17 05:48 [Show Content]
patch file icon improved_translation_interface_part1_modules.patch [^] (1,626 bytes) 2012-10-17 05:48 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]
related to 0001413resolvedalex Simultaneous editing message not shown 

-  Notes
User avatar (0004628)
Dmitry (manager)
2012-05-15 17:35

Moved task to In-Portal CMS project from Infrastructure.
User avatar (0004709)
Dmitry (manager)
2012-06-05 12:42

Moving to Icebox for now.
User avatar (0005218)
alex (manager)
2012-10-11 08:43
edited on: 2012-10-16 04:28

What can happen and I don't know yet how to overcome this:
==========================================================
1. Website has 3 languages and 1 user per each language who does translation. User1 changed translation on 1st language and made it (translation) primary. How likely User2 and User3 would come into Admin Console at same time and edit same label? Who saves last (due temporary table usage) will overwrite user translation change who saved before him.

2. Same website with English/Russian/Latvian languages. Each of translators only speak 2 languages: language he will translate and English. Russian translator clicked "Use as Primary" button on Russian translation and now all other translators see it instead of primary (English) translation because it's most current. However they can't read Russian to know how to translate it into their language.

3. Toolbar button "Use as Primary" shown on phrase/e-mail event saving page would only work for phrase/e-mail event that user sees right now and won't affect other phrases/e-mail events that user is editing together with this one.

4. Manual language pack import.

5. Deployment script language pack import.

User avatar (0005227)
alex (manager)
2012-10-16 04:28

Solutions to above problems
===========================

1. show simultaneous edit message to warn 2nd user, who is trying to edit phrase/e-mail event that is already being edited.

2. presume that translator can use "Google Translate" or similar website to translate source language phrase/e-mail event translation into his native language.

3. update all phrases/e-mail events that are being edited right now.

4. add checkbox that would make all imported phrases in sync OR not in sync.

5. make all new phrases/e-mail events unsynced.
User avatar (0005228)
alex (manager)
2012-10-17 05:37
edited on: 2012-10-17 05:48

What was done besides main task:
================================
1. CSS that was used to highlight code pieces in "System Log" and "E-mail Log" was moved away into Admin Skin
2. Show fields with translation from source language (for given phrase/e-mail event) instead of always translation from primary language
3. Don't show source translation when editing phrase/e-mail event on source language
4. Show "Source Hint Translation" and "Source Column Translation" for phrases
5. Show "Source Subject", "Source HTML Version" and "Source Text Version" for e-mail events
6. Show source translation fields after current translation fields
7. If "Custom" module installed & enabled then use it as default module for newly created e-mail events.
8. Don't show "Set as Primary" toolbar button on phrase/e-mail event editing pages, when there is only 1 language pack imported on website.
9. "%4$s" inside custom fields will be replaced with primary language id (before only "%2$s" was replaced with current language id)
10. LanguageImportHelper now accepts multiple options via bit-system (e.g. 1, 2, 4, 8 ...)

User avatar (0005229)
alex (manager)
2012-10-17 05:53

Patches "improved_translation_interface_part1_core.patch" and "improved_translation_interface_part1_modules.patch" contains all translation functionality without translation statistics calculations.

- Related Changesets
In-Portal CMS: 5.3.x r15584
Timestamp: 2012-10-17 05:50:12
Author: alex
Details ] Diff ]
Bug 0001023: Ability to Keep Language Packs in Sync
mod - /in-portal/branches/5.3.x/admin/system_presets/simple/email_events_emailevents.php Diff ] File ]
mod - /in-portal/branches/5.3.x/admin/system_presets/simple/phrases_phrases.php Diff ] File ]
mod - /in-portal/branches/5.3.x/core/admin_templates/import/import_start.tpl Diff ] File ]
mod - /in-portal/branches/5.3.x/core/admin_templates/incs/form_blocks.tpl Diff ] File ]
mod - /in-portal/branches/5.3.x/core/admin_templates/incs/style_template.css Diff ] File ]
mod - /in-portal/branches/5.3.x/core/admin_templates/languages/email_message_edit.tpl Diff ] File ]
mod - /in-portal/branches/5.3.x/core/admin_templates/languages/phrase_edit.tpl Diff ] File ]
mod - /in-portal/branches/5.3.x/core/admin_templates/logs/email_logs/email_log_edit.tpl Diff ] File ]
mod - /in-portal/branches/5.3.x/core/admin_templates/logs/system_logs/system_log_edit.tpl Diff ] File ]
mod - /in-portal/branches/5.3.x/core/admin_templates/mailing_lists/mailing_list_edit.tpl Diff ] File ]
mod - /in-portal/branches/5.3.x/core/admin_templates/regional/languages_import.tpl Diff ] File ]
mod - /in-portal/branches/5.3.x/core/admin_templates/regional/phrases_edit.tpl Diff ] File ]
mod - /in-portal/branches/5.3.x/core/install/english.lang Diff ] File ]
mod - /in-portal/branches/5.3.x/core/install/install_data.sql Diff ] File ]
mod - /in-portal/branches/5.3.x/core/install/install_schema.sql Diff ] File ]
mod - /in-portal/branches/5.3.x/core/install/install_toolkit.php Diff ] File ]
mod - /in-portal/branches/5.3.x/core/install/upgrades.css Diff ] File ]
mod - /in-portal/branches/5.3.x/core/install/upgrades.php Diff ] File ]
mod - /in-portal/branches/5.3.x/core/install/upgrades.sql Diff ] File ]
mod - /in-portal/branches/5.3.x/core/kernel/constants.php Diff ] File ]
mod - /in-portal/branches/5.3.x/core/kernel/kbase.php Diff ] File ]
mod - /in-portal/branches/5.3.x/core/units/email_events/email_event_tp.php Diff ] File ]
mod - /in-portal/branches/5.3.x/core/units/email_events/email_events_config.php Diff ] File ]
mod - /in-portal/branches/5.3.x/core/units/email_events/email_events_event_handler.php Diff ] File ]
mod - /in-portal/branches/5.3.x/core/units/helpers/deployment_helper.php Diff ] File ]
mod - /in-portal/branches/5.3.x/core/units/helpers/language_import_helper.php Diff ] File ]
mod - /in-portal/branches/5.3.x/core/units/helpers/multilanguage_helper.php Diff ] File ]
mod - /in-portal/branches/5.3.x/core/units/helpers/themes_helper.php Diff ] File ]
mod - /in-portal/branches/5.3.x/core/units/languages/languages_event_handler.php Diff ] File ]
mod - /in-portal/branches/5.3.x/core/units/logs/email_logs/email_log_eh.php Diff ] File ]
mod - /in-portal/branches/5.3.x/core/units/mailing_lists/mailing_list_eh.php Diff ] File ]
mod - /in-portal/branches/5.3.x/core/units/phrases/phrase_tp.php Diff ] File ]
mod - /in-portal/branches/5.3.x/core/units/phrases/phrases_config.php Diff ] File ]
mod - /in-portal/branches/5.3.x/core/units/phrases/phrases_event_handler.php Diff ] File ]
Modules :: In-Commerce: 5.3.x r15583
Timestamp: 2012-10-17 05:49:38
Author: alex
Details ] Diff ]
Bug 0001023: Ability to Keep Language Packs in Sync
mod - /w/in-commerce/branches/5.3.x/units/currencies/currencies_config.php Diff ] File ]
mod - /w/in-commerce/branches/5.3.x/units/currencies/currencies_event_handler.php Diff ] File ]

- Issue History
Date Modified Username Field Change
2012-10-17 05:53 alex Note Added: 0005229
2012-10-17 05:50 alex Changeset attached 5.3.x r15584
2012-10-17 05:49 alex Changeset attached 5.3.x r15583
2012-10-17 05:48 alex File Added: improved_translation_interface_part1_modules.patch
2012-10-17 05:48 alex File Added: improved_translation_interface_part1_core.patch
2012-10-17 05:48 alex Note Edited: 0005228 View Revisions
2012-10-17 05:38 alex Note Edited: 0005228 View Revisions
2012-10-17 05:37 alex Note Added: 0005228
2012-10-16 04:28 alex Note Edited: 0005218 View Revisions
2012-10-16 04:28 alex Note Added: 0005227
2012-10-16 04:25 alex Target Version Icebox => 5.3.0
2012-10-15 10:55 alex Relationship added related to 0001413
2012-10-11 10:32 alex Note Edited: 0005218 View Revisions
2012-10-11 10:03 alex Note Edited: 0005218 View Revisions
2012-10-11 08:43 alex Note Added: 0005218
2012-07-17 11:06 Dmitry Estimate Points 0 => 2
2012-06-05 12:42 Dmitry Note Added: 0004709
2012-06-05 12:42 Dmitry Target Version 5.2.0 => Icebox
2012-05-17 02:18 alex Description Updated View Revisions
2012-05-17 02:07 alex Description Updated View Revisions
2012-05-16 23:14 Dmitry Additional Information Updated View Revisions
2012-05-16 23:14 Dmitry Change Log Message => Added functionality to Keep Language Packs in Sync
2012-05-16 23:14 Dmitry Target Version Icebox => 5.2.0
2012-05-16 23:14 Dmitry Summary Keeping language packs from different languages in sync => Ability to Keep Language Packs in Sync
2012-05-16 23:14 Dmitry Description Updated View Revisions
2012-05-16 23:14 Dmitry Additional Information Updated View Revisions
2012-05-15 17:35 Dmitry Estimate Points => 0
2012-05-15 17:35 Dmitry Note Added: 0004628
2012-05-15 17:35 Dmitry Category Software Release => Localization
2012-05-15 17:35 Dmitry Target Version => Icebox
2012-05-15 17:34 Dmitry Project Infrastructure => In-Portal CMS
2011-03-13 08:14 alex New Issue
2011-03-13 08:14 alex Reference => https://groups.google.com/d/topic/in-portal-local/Y44XAWlz0AU/discussion



Web Development by Intechnic
In-Portal Open Source CMS
In-Portal Open Source CMS
Copyright © 2000 - 2009 MantisBT Group

Powered by Mantis Bugtracker