[ZBX-3326] Gettextization engine improvement. Created: 2010 Dec 21 Updated: 2017 May 30 Resolved: 2011 Jan 14 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | None |
Affects Version/s: | 1.9.1 (alpha) |
Fix Version/s: | 1.9.2 (alpha) |
Type: | Incident report | Priority: | Major |
Reporter: | Oleksii Zagorskyi | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Labels: | None | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
latest trunk |
Attachments: |
![]() ![]() |
Description |
Heh. So, I decided to create a separate issue not to be confused with others. After merge Now in all locales (at end of PO files) we see obsolete messages marked by #~ header. Note: Virtaal is much better that Poedit. IMHO. |
Comments |
Comment by Oleksii Zagorskyi [ 2010 Dec 21 ] |
some interesting link http://mel.melaxis.com/devblog/2006/04/10/benchmarking-php-localization-is-gettext-fast-enough/ |
Comment by richlv [ 2010 Dec 21 ] |
hmm. for that specific string, i'd argue there is no need to use _s at all - it has no placeholders and thus only uses one sprintf call needlessly (and additional internal function call) would be nice to check whether there are other cases like that as well and remove _s use from all of them i wanted to add _s inclusion already before, just didn't get to it yet - added now |
Comment by richlv [ 2010 Dec 21 ] |
as for obsolete strings, this is something to be discussed. i propose to keep them in for now and return to this discussion once we have worked with gettext solution for a while |
Comment by Oleksii Zagorskyi [ 2010 Dec 22 ] |
README should be corrected regarding to automatic creation of POTFILES.in . I want to draw attention to an important point. Why? Answer - #: ../config.php:883 But this is wrong. Even if you add correct Ukrainian "Plural-Forms:..." to PO header and run again 'update_po.sh' it is not helped - in PO file leaving only two forms: As result the GUI editors (Poedit, Virtaal) not present an interface to correct translation plural. Correctly for Ukrainian and Russian these three forms, witch automatically generated for the founded new _n() if correct header is defined: NOTE - Poedit perfectly presents numerical examples for each form according to locale of PO file, Virtaal without examples, but all three forms simultaneously. So, you must to add promptly the correct "Plural-Forms:..." to header of each locale. |
Comment by richlv [ 2010 Dec 22 ] |
readme corrected; |
Comment by Oleksii Zagorskyi [ 2010 Dec 22 ] |
About string location references. But if i manually change to this: About my previous post with text "- in PO file leaving only two forms:" And as I said earlier, all three forms will be correctly added only for the newly found _n() functions. |
Comment by Oleksii Zagorskyi [ 2010 Dec 23 ] |
So I prepared a patch to correct the plural in all locales. For forgotten Japanese from |
Comment by richlv [ 2010 Dec 23 ] |
please, review |
Comment by Konstantin Buravcov (Inactive) [ 2010 Dec 23 ] |
Looks good |
Comment by richlv [ 2010 Dec 23 ] |
plural forms added, thanks. |
Comment by Oleksii Zagorskyi [ 2010 Dec 24 ] |
No answer or action for my comment "About string location references." then reopen, sorry If i write Base path: as ../../ then the functionality presented in the picture "reference_path.png" works well. Of course this is related only for the Poedit (i'm tested only Poedit and Virtaal) and may be this idea will be discarded by you, but maybe it better to include this header in all locales and close thread about path for string location references. At you decision. |
Comment by Oleksii Zagorskyi [ 2011 Jan 02 ] |
About references to source code. Richlv likes to see diff for new translation file, but sometimes it gives a false result. What I've noticed: FIND command on different servers, even on the same operating system provides a list of files in a different sequence (POTFILES.in). instead of this: I suggest adding sorting to the 'POTFILES.in'. This works: |
Comment by Oleksii Zagorskyi [ 2011 Jan 02 ] |
I noticed differences between FreeBSD and Linux 'sort' work. Example - Example (upper-lower case) - If i add both of flags -d -f for 'sort' command then FreeBSD=Linux. man sort: So i propose to use |
Comment by Oleksii Zagorskyi [ 2011 Jan 03 ] |
I noticed that fuzzy strings in not inserted to .mo file ‘--use-fuzzy’ I'm think in our case that they should be included. |
Comment by richlv [ 2011 Jan 03 ] |
fuzzy entries should be now included in mo files - reasoning being that we don't do automatic fuzzy matching, so fuzzy entries would be marked by translators. as such, they are not expected to be awfully wrong and would contribute to the translation being more complete |
Comment by richlv [ 2011 Jan 03 ] |
for the record, sorting was also added to the script it would be nice to summarise what other problems are still there, and once they are solved, close this issue & deal with other problems in new issues. 1. _x() missing; anything else ? |
Comment by Oleksii Zagorskyi [ 2011 Jan 03 ] |
1. _x() missing; 2. file references in po files to be figured out |
Comment by richlv [ 2011 Jan 14 ] |
X-Poedit-Basepath header added to all locales |