Summary: | Some strings are wrapped at ~ 80. char | ||
---|---|---|---|
Product: | [Applications] lokalize | Reporter: | Mariusz <fisiu82> |
Component: | editor | Assignee: | Nick Shaforostoff <shafff> |
Status: | RESOLVED WORKSFORME | ||
Severity: | major | CC: | adrian, chaofeng111, fisiu82 |
Priority: | NOR | Keywords: | triaged |
Version: | 1.2 | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
Original .po file
Edited .po file |
Created attachment 56739 [details]
Edited .po file
I removed one char then added back in the first String to get save file possibility. This file should have changed only headers, not data!
SVN commit 1227648 by shaforo: BUG:265086 Implement a hidden switch that allows to disable automatic msgfmt-like wordwrap at 80 char width. To enable it add the following lines in the project .lokalize file: [RegExps] WordWrap=-1 (to be backported into 4.6) M +15 -2 catalog/gettext/gettextexport.cpp M +2 -2 catalog/gettext/gettextstorage.cpp M +3 -0 project/projectbase.kcfg WebSVN link: http://websvn.kde.org/?view=rev&revision=1227648 SVN commit 1227671 by shaforo: BUG:265086 backport wordwrapping setting for those who consider this urgent M +19 -2 catalog/gettext/gettextexport.cpp M +1 -2 catalog/gettext/gettextstorage.cpp M +3 -0 project/projectbase.kcfg WebSVN link: http://websvn.kde.org/?view=rev&revision=1227671 This doesn't work as it should. Can You do it to make lokalize work as version shipped with KDE 4.5? It was the last version which worked really good. When I set: [RegExps] WordWrap=-1 it still make some fuzzies while I edited totally different string: #: ../parser_misc.c:648 #, c-format msgid "Internal error generated invalid perm 0x%llx\n" -msgstr "Wewnętrzny błąd spowodował utworzenie nieprawidłowego uprawnienia 0x%llx\n" +msgstr "" +"Wewnętrzny błąd spowodował utworzenie nieprawidłowego uprawnienia 0x%llx\n" #: ../parser_misc.c:902 ../parser_symtab.c:563 ../parser_regex.c:744 #: ../parser_variable.c:227 SVN commit 1227924 by shaforo: BUG: 265086 make lokalize preserve PO formatting better when user asks it. Fisiu: the 80 formatting change was done consiously, to make diffs for KDE l10n look cleaner. In KDE a msgfmt is applied automatically to all PO files when they are updates to reflect new sources. please check if the current state is fine for you. maybe some other important changes are needed. M +24 -0 catalogitem.cpp M +4 -0 catalogitem.h M +2 -0 catalogitem_private.h M +11 -10 gettextexport.cpp M +1 -1 gettextexport.h M +9 -9 gettextimport.cpp M +2 -0 gettextimport.h WebSVN link: http://websvn.kde.org/?view=rev&revision=1227924 (please compile from trunk) I tested r1229123. It still wraps all strings longer then 80 chars... I run lokalize using: lokalize --noprojectscan some_file.po I re-saved some_file.po file and I got heavily modified file. Some proof: #: help-install.html:383(li) #, fuzzy #| msgid "<placeholder-1/> -- switch on ACPI even if your BIOS is dated before 2000<br><placeholder-2/></br>" -msgid "<placeholder-1/> -- switch on ACPI even if your BIOS is dated before 2000" -msgstr "<placeholder-1/> - włącz ACPI nawet jeśli BIOS pochodzi sprzed roku 2000" +msgid "" +"<placeholder-1/> -- switch on ACPI even if your BIOS is dated before 2000" +msgstr "" +"<placeholder-1/> - włącz ACPI nawet jeśli BIOS pochodzi sprzed roku 2000" I did use no project config file at all. When I used a project file with options: [RegExps] WordWrap=-1 only source strings (msgid) are placed in a new line: #: nautilus/libnautilus-private/apps_nautilus_preferences.schemas.in.h:107 -msgid "Set this to true if you are deploying a kiosk and don't want users to access the context menu in file views." +msgid "" +"Set this to true if you are deploying a kiosk and don't want users to access the context menu in file views." msgstr "W przypadku instalowania kiosku należy ustawić wartość \"true\", aby uniemożliwić użytkownikom dostęp do menu podręcznego." msgstr look fine, as it should :) Could You do the same 'hack' for msgid strings? If You need any other info, please let me know. are you still experiencing misbehaviour with msgid modification? i cannot reproduce it with Lokalize from KDE 4.8 This bug is still valid for me. Tested with Lokalize 1.4 / KDE SC 4.8.0. I used the same file as attached in #c0. No matter what value of WordWrap is or even without it at all - after saving file, there are modified msgid and msgstr, which weren't touched in editor. SVN commit 1283057 by shaforo: fix word (non-)wrapping also cleanup propjectmodel nodes on exit M +8 -0 catalog/gettext/gettextimport.cpp M +3 -1 project/projectmodel.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1283057 I tested recently Lokalize 1.4 with KDE 4.8.2 for short period of time, and finally [RegExps] WordWrap=-1 put in .lokalize project file does the trick with wordwrapping. After more testing, I spot some weird behavior. If we have some String ready to translate with msgstr emty, after translation, our localized string is put in a new line: #: src/vminstall/msg.py:283 msgid "Paravirtualized PXE booting requires the use of tftp or atftp. Please install one of these packages." msgstr "" +"Parawirtualne bootowanie PXE wymaga użycia tftp lub aftp. Należy zainstalować jeden z tych pakietów." Any chance to improve it, to put localized String directly after msgstr, not in a new line? Regards, Mariusz I noticed something weird with this setting. Sometimes new line markers '\n' are missing after saving .po file. `msgfmt -cv file.po` gives error with incorrect \n count between msgid and msgstr. Now I set WordWrap=10000 in project config file to avoid wrapping msgid and msgstr (until some string have more then 10k chars). But it needs some more tests. can you give me exact msgstrs which produce incorrect results in terms of \n? This could be closed as Needs Info. Change to NeedsInfo because reporter do not reply after a long time. Dear Bug Submitter, This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days, the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging If you have already provided the requested information, please set the bug status as REPORTED so that the KDE team knows that the bug is ready to be confirmed. Thank you for helping us make KDE software even better for everyone! Dear Bug Submitter, This bug has been in NEEDSINFO status with no change for at least 30 days. The bug is now closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging Thank you for helping us make KDE software even better for everyone! |
Created attachment 56738 [details] Original .po file Version: 1.2 (KDE 4.6) (using KDE 4.6.0) OS: Linux Some strings from .po files, which are bit longer then one line, during saving .po file are divided into several lines. I tested in on some openSUSE localization file. I edited one char in first string. Then I saved this file and review the diff. A new .po file was messed up. File, before and after edit in attachment. Reproducible: Always Steps to Reproduce: 1. Create backup of tested .po file then open it in Lokalize 1.2 2. Do some minor changes and save file. 3. Review diff from backup and edited file. Actual Results: Edited file is messed up, many strings are wrapped ~ 80. char. Expected Results: Only "touched" Strings should be changed.