Anonymous | Login | Signup for a new account | 2023-06-01 10:19 CDT | ![]() |
Main | My View | View Issues | Change Log | Roadmap | Docs | Wiki | Repositories |
Viewing Issue Simple Details [ Jump to Notes ] [ Wiki ] | [ View Advanced ] [ Issue History ] [ Print ] | ||||||
ID | Category | Type | Reproducibility | Date Submitted | Last Update | ||
0000751 | [In-Portal CMS] Data Management | feature request | N/A | 2010-05-29 04:18 | 2012-07-25 05:33 | ||
Reporter | alex | View Status | public | Project Name | In-Portal CMS | ||
Assigned To | alex | Developer | |||||
Priority | normal | Resolution | fixed | Fixed in Version | 5.2.0-B1 | ||
Status | closed | Product Version | 5.0.4-B1 | Target Version | 5.2.0 | ||
Time Estimate | No estimate | ||||||
Summary | 0000751: Allow to set phrase initial translation from template | ||||||
Description |
I propose we add ability to set phrase initial translation from inside template. For example, when you already know phrase translation, when you are placing it into template. This could be done like this: <inp2:m_Phrase name="la_fld_TestField" default="Test Field"/> This should speed up development stage of project, since user should not re-visit template to click on each phrase to translate it. |
||||||
Additional Information |
This will create phrase translation on current language only, when it's not already there. Only will try to create translation, when template will be visited. Won't overwrite any phrases from language pack, since they are imported before templates are visited. |
||||||
Tags | No tags attached. | ||||||
Reference | http://groups.google.com/group/in-portal-dev/browse_thread/thread/67dc5e6422bc4747 | ||||||
Change Log Message | |||||||
Estimate Points | 2 | ||||||
Attached Files |
![]() ![]() ![]() ![]() |
||||||
|
![]() |
|
![]() |
|
![]() alex (manager) 2011-09-26 02:47 |
From implementation viewpoint I think, that there is no need to pass through default phrase translation from "m_Phrase" tag to "PhrasesCache::GetPhrase" method and you can create new phrase directly in "m_Phrase" tag. Please make sure, that phrase translation is set on primary & current front-end language. |
![]() erik (manager) 2011-09-27 09:28 |
Patch 751.patch [^] (1,728 bytes) 2011-09-27 09:27 attached |
![]() erik (manager) 2011-09-27 09:29 |
Needs testing |
![]() alex (manager) 2011-09-27 12:32 |
There are some things about this patch, that needs to be fixed: 1. $phrase_default variable is incorrect, since it's not default phrase (which is label), but it's default translation. That's why this variable should be called $default_translation. 2. if clause is divided into multiple lines, but there is no reason for that, since it's pretty short. 3. method kMultiLanguageHelper::getLanguages doesn't return value by reference and that's why there no need to use =& when this method is used 4. why code is so compressed, no empty lines inserted before/after block statements (e.g. if/while/foreach etc.)? 5. why you use intermediate "phrases.autocreate:OnCreate" event to create object, when you already have object filled with data and only need to call $phrase->Create() method and check for a result to see if phrase was created? 6. also an empty line should be inserted after each "/* @var ... " construct |
![]() erik (manager) 2011-09-28 03:40 |
fixed - patch #2 attached |
![]() alex (manager) 2011-10-03 13:01 |
1. PhraseKey field contains uppercased phrase label, but phrase name given in template to m_Phrase tag has original case in database. Please do uppercase phrase label, before comparing it with values from PhraseKey field (in kDBItem::Load method call). 2. Please also check for "!" symbol presence before and after phrase translation to detect if it's translated or not. This is the right check to be made: strpos($translation, '!' . $phrase_name . '!') !== false |
![]() erik (manager) 2011-10-04 04:28 |
phrase_initial_translation_751.3.patch attached - needs testing |
![]() alex (manager) 2011-10-05 08:37 |
Fix committed to 5.2.x branch. Commit Message: Fixes 0000751: Allow to set phrase initial translation from template Commit on behalf of Erik |
![]() alex (manager) 2012-07-25 05:33 |
Since 5.2.0 version was released. |
![]() |
|||
In-Portal CMS: 5.2.x r14638 Timestamp: 2011-10-05 08:37:45 Author: alex [ Details ] [ Diff ] |
Fixes 0000751: Allow to set phrase initial translation from template Commit on behalf of Erik |
||
mod - /in-portal/branches/5.2.x/core/kernel/processors/main_processor.php | [ Diff ] [ File ] | ||
![]() |
|||
Date Modified | Username | Field | Change |
2012-07-25 05:33 | alex | Note Added: 0005105 | |
2012-07-25 05:33 | alex | Status | resolved => closed |
2011-10-22 05:30 | alex | Estimate Points | => 2 |
2011-10-05 08:37 | alex | Note Added: 0004021 | |
2011-10-05 08:37 | alex | Status | reviewed and tested => resolved |
2011-10-05 08:37 | alex | Fixed in Version | => 5.2.0-B1 |
2011-10-05 08:37 | alex | Resolution | open => fixed |
2011-10-05 08:37 | alex | Assigned To | !COMMUNITY => alex |
2011-10-05 08:37 | alex | Changeset attached | 5.2.x r14638 |
2011-10-05 08:37 | alex | Assigned To | alex => !COMMUNITY |
2011-10-05 08:37 | alex | Status | needs testing => reviewed and tested |
2011-10-05 08:37 | alex | File Added: phrase_default_translation_v3.patch | |
2011-10-04 04:28 | erik | Note Added: 0003992 | |
2011-10-04 04:28 | erik | Assigned To | erik => alex |
2011-10-04 04:28 | erik | Status | needs work => needs testing |
2011-10-04 04:27 | erik | File Added: phrase_initial_translation_751.3.patch | |
2011-10-03 13:01 | alex | Note Added: 0003984 | |
2011-10-03 13:01 | alex | Assigned To | alex => erik |
2011-10-03 13:01 | alex | Status | needs testing => needs work |
2011-09-28 03:41 | erik | Status | needs work => needs testing |
2011-09-28 03:40 | erik | Assigned To | erik => alex |
2011-09-28 03:40 | erik | Note Added: 0003931 | |
2011-09-28 03:39 | erik | File Added: 751.2.patch | |
2011-09-27 12:32 | alex | Note Added: 0003930 | |
2011-09-27 12:32 | alex | Assigned To | alex => erik |
2011-09-27 12:32 | alex | Status | needs testing => needs work |
2011-09-27 09:30 | erik | Status | needs work => needs testing |
2011-09-27 09:29 | erik | Status | needs testing => needs work |
2011-09-27 09:29 | erik | Assigned To | erik => alex |
2011-09-27 09:29 | erik | Time Estimate Removed | 1 => |
2011-09-27 09:29 | erik | Note Added: 0003929 | |
2011-09-27 09:29 | erik | Developer | => erik |
2011-09-27 09:29 | erik | Status | needs work => needs testing |
2011-09-27 09:28 | erik | Note Added: 0003928 | |
2011-09-27 09:27 | erik | File Added: 751.patch | |
2011-09-27 04:14 | alex | Time Estimate Added | 1 |
2011-09-26 02:47 | alex | Note Added: 0003909 | |
2011-09-23 21:48 | Dmitry | Assigned To | => erik |
2011-09-23 21:48 | Dmitry | Status | active => needs work |
2011-09-23 21:48 | Dmitry | Target Version | Icebox => 5.2.0 |
2010-05-29 04:18 | alex | New Issue | |
2010-05-29 04:18 | alex | Reference | => http://groups.google.com/group/in-portal-dev/browse_thread/thread/67dc5e6422bc4747 |
Main | My View | View Issues | Change Log | Roadmap | Docs | Wiki | Repositories |
Web Development by Intechnic![]() In-Portal Open Source CMS |