Summary: | [PATCH] switch to semantic internationalisation | ||
---|---|---|---|
Product: | [Applications] digikam | Reporter: | Torbjörn K. <torbjoern.k> |
Component: | Plugin-DImg-RAW | Assignee: | Digikam Developers <digikam-bugs-null> |
Status: | CLOSED FIXED | ||
Severity: | normal | CC: | caulier.gilles, lueck, torbjoern.k, vivo75+kde |
Priority: | NOR | ||
Version: | 2.0.0 | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 2.0.0 | |
Sentry Crash Report: | |||
Attachments: |
changing from i18n to i18nc
updated patch everything is a learning process... ...still learning... review-me.patch |
I cannot apply your patch against current git master: [gilles@localhost libkdcraw]$ git reset --hard HEAD HEAD is now at 780bfb0 apply patch #60673 [gilles@localhost libkdcraw]$ patch -p0 < libkdcraw_i18nc_r1.patch patching file libkdcraw/dcrawsettingswidget.cpp Reversed (or previously applied) patch detected! Assume -R? [n] R Apply anyway? [n] y Hunk #1 FAILED at 183. Hunk #2 FAILED at 200. Hunk #3 FAILED at 220. Hunk #4 FAILED at 326. Hunk #5 FAILED at 354. Hunk #6 FAILED at 455. Hunk #8 FAILED at 521. Hunk #9 FAILED at 550. Hunk #10 succeeded at 594 (offset 2 lines). Hunk #11 FAILED at 600. Hunk #12 succeeded at 658 (offset 2 lines). Hunk #13 FAILED at 867. Hunk #14 succeeded at 952 (offset 2 lines). Hunk #15 succeeded at 1020 (offset 2 lines). Hunk #16 succeeded at 1043 (offset 2 lines). Hunk #17 succeeded at 1071 (offset 2 lines). Hunk #18 succeeded at 1118 (offset 2 lines). Hunk #19 succeeded at 1140 (offset 2 lines). Hunk #20 succeeded at 1164 (offset 2 lines). 10 out of 20 hunks FAILED -- saving rejects to file libkdcraw/dcrawsettingswidget.cpp.rej patching file libkdcraw/rcombobox.cpp patching file libkdcraw/rnuminput.cpp Gilles Caulier Created attachment 60726 [details]
updated patch
the first did not work, thus a new try
I'm sorry for causing problems. I created the patch through Kdevelop via right clicking on the project root (libkdcraw) and using Git -> compare against HEAD. If this update does not work, I can email you these three files. It's always the same : [gilles@localhost libkdcraw]$ patch -p0 < libkdcraw_i18nc_r1.patch patching file libkdcraw/dcrawsettingswidget.cpp Reversed (or previously applied) patch detected! Assume -R? [n] Apply anyway? [n] Skipping patch. 20 out of 20 hunks ignored -- saving rejects to file libkdcraw/dcrawsettingswidget.cpp.rej patching file libkdcraw/rcombobox.cpp patching file libkdcraw/rnuminput.cpp [gilles@localhost libkdcraw]$ The problem is with dcrawsettingswidget.cpp. I suspect that your local git repository is not up to date. performing "git pull" before to make patch will solve the problem. Also use "git diff > foo.patch" to make patch. Gilles Caulier Created attachment 60741 [details]
everything is a learning process...
Thank you for your help and I hope this one works. I'm sorry for causing these troubles. It's my first time working on source code in a collaborative environment.
I did the following:
myself@suseTower:/kde/kdesrc/git/kde/kdegraphics/libs/libkdcraw> git pull
remote: Counting objects: 11, done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 8 (delta 6), reused 0 (delta 0)
Unpacking objects: 100% (8/8), done.
From git://anongit.kde.org/libkdcraw
328344c..a9da867 master -> origin/master
Updating 328344c..a9da867
error: Your local changes to the following files would be overwritten by merge:
libkdcraw/dcrawsettingswidget.cpp
Please, commit your changes or stash them before you can merge.
Aborting
myself@suseTower:/kde/kdesrc/git/kde/kdegraphics/libs/libkdcraw> git diff > /kde/diffs/libkdcraw_i18nc_r1.patch
myself@suseTower:/kde/kdesrc/git/kde/kdegraphics/libs/libkdcraw> path -p0 < /kde/diffs/libkdcraw_i18nc_r1.patch
myself@suseTower:/kde/kdesrc/git/kde/kdegraphics/libs/libkdcraw>
Its' always the same : [gilles@localhost libkdcraw]$ patch -p1 < libkdcraw_i18nc_r1.patch patching file libkdcraw/dcrawsettingswidget.cpp Hunk #1 FAILED at 200. Hunk #2 FAILED at 220. Hunk #3 FAILED at 326. Hunk #4 FAILED at 354. Hunk #5 FAILED at 455. Hunk #7 FAILED at 521. Hunk #8 FAILED at 550. Hunk #9 succeeded at 594 (offset 2 lines). Hunk #10 FAILED at 600. Hunk #11 succeeded at 658 (offset 2 lines). Hunk #12 FAILED at 867. 9 out of 12 hunks FAILED -- saving rejects to file libkdcraw/dcrawsettingswidget.cpp.rej patching file libkdcraw/rcombobox.cpp patching file libkdcraw/rnuminput.cpp Do you have merged your changes from your local repository with my last changes from git masrter, before to make patch? Gilles Caulier Created attachment 60743 [details]
...still learning...
Ok. Now I first copied my locally changed file to another directory, deleted the file in my local clone of the repository and pulled the latest version from git. Then I used KDiff3 to compare and merge those two files. Finally I used git diff to produce this patch file.
Git commit ceb4cd533344c92977485625c1740c71bc69e56a by Gilles Caulier. Committed on 07/06/2011 at 14:40. Pushed by cgilles into branch 'master'. apply patch #60743 BUGS: 275039 M +272 -237 libkdcraw/dcrawsettingswidget.cpp M +1 -1 libkdcraw/rcombobox.cpp M +2 -2 libkdcraw/rnuminput.cpp http://commits.kde.org/libkdcraw/ceb4cd533344c92977485625c1740c71bc69e56a Patch applied (:=)))... for these warnings : 13. Check validity of i18n calls [i18ncheckarg]... 7 issues found dcrawsettingswidget.cpp: missing KUIT context marker line#593,627 dcrawsettingswidget.cpp: single adjective as message, probably ambiguous; explain what it refers to following the KUIT context marker line#316,343,365,420,432 I have no idea. Ask to i18n team coordinator. Gilles Caulier Created attachment 60748 [details] review-me.patch (In reply to comment #5) [snip] > error: Your local changes to the following files would be overwritten by merge: > libkdcraw/dcrawsettingswidget.cpp > Please, commit your changes or stash them before you can merge. > Aborting [snip] This error mean that git is unable to automatically merge the two repositories and manual merge is needed. http://book.git-scm.com/5_advanced_branching_and_merging.html explain something about conflict-resolution, would like to help more but I'm myself unfamiliar with the matter. In fact usually when conflict happen I do start from a fresh copy and re-apply all the patches when possible and do manually the rest. I've done this for you and you can see attached the patch against HEAD of libkdcraw, it has been done in a hurry please check it double Also a suggestion for the next time. try to limit the number of changes per commit, for example this patch caould have been divided into: 1) add @item and change to i18nc 2) re-format lines lenght oh oh, seem I'm arrived late Thanks Francesco, But, i suppose that torbjoern do not have used or merged current change from git master and local repository. As i use a git master up to date, applying patch failed. Gilles Caulier Thank you, Francesco, for the link and suggestions. I'll read it for future use. (In reply to comment #12) > Thanks Francesco, > > But, i suppose that torbjoern do not have used or merged current change from > git master and local repository. As i use a git master up to date, applying > patch failed. > > Gilles Caulier hum, that's me not explaining well as usual, I've used the first patch attached to this bug, applied it to current git master and then re-made the diff (attach id=60748) because for me previous one (attach id=60743) was still not applying cleanly. In the meantime you were already working on it and solved differently ;) right? well, the last one provided have been applied successfully to git master as well... Gilles |
Created attachment 60686 [details] changing from i18n to i18nc Version: unspecified (using Devel) OS: Linux This patch alters all i18n calls to its semantic counterpart i18nc and adds semantic labels and markup to the strings. I did not alter the context of the strings, just the markup. Thus, it should be easy to update for translators. Changes were made in libkdcraw/dcrawsettingswidget.cpp, libkdcraw/rnuminput.cpp and libkdcraw/rcombobox.cpp. However, I do not understand the following (and only) Krazy warnings in dcrawsettingswidget.cpp, as I cannot find anything odd in the corresponding lines: 13. Check validity of i18n calls [i18ncheckarg]... 7 issues found dcrawsettingswidget.cpp: missing KUIT context marker line#593,627 dcrawsettingswidget.cpp: single adjective as message, probably ambiguous; explain what it refers to following the KUIT context marker line#316,343,365,420,432 Reproducible: Always Patch against master. Compiled with latest KDE trunk available through openSUSE repositories. Tested in self-compiled digikam from master.