[PATCH] juk: filerename: use translated stings when searching for category to insert.

Michael Pyne mpyne at kde.org
Wed Apr 20 04:05:23 BST 2011

On Wednesday, April 20, 2011 00:49:46 Γιώργος Κυλάφας wrote:
> Hi all,
> I experienced the problem mentioned in
> https://bugs.kde.org/show_bug.cgi?id=118317, however commit
> http://websvn.kde.org/?view=revision&revision=988893 did not fix it
> for me.
> I could only insert categories "Track" and "Title" to the File Renamer
> and not any of the others.
> At some point, I realized that those two were the only non-translated
> categories appearing in the combobox, so I after searching for a while
> I managed to fix the problem with the attached patch. From what I can
> understand from the code, tagTypeText() should be called with
> "translate = false" only when read/writing the config file, and not
> inside tagFromCategoryTest().

Thanks for looking into the issue!

I've already applied the patch from your other email (and backported to 4.6.3, 
which is likely the first place you'd see it).

I've installed a language pack and confirmed the issue you describe. You're 
right in that it is based on whether the strings passed to tagTypeText() is 
translated or not.

Also if I remember right, the translated text should be used *only* for the 
GUI labels, not for the config file or for internal JuK usage. As long as JuK 
internally is consistent with using translated or non-translated text it 
should still work fine, I suspect I was not fully consistent on that point and 
failed to catch it due to running a non-localized KDE desktop. However, 
looking at the comment for tagFromCategoryText() in the tagrenameroptions.h it 
seems that was my intent at least.

It turns out that FileRenamer was the only user of tagFromCategoryText() and 
so we can be flexible on that point. However it is easy enough to do what was 
intended in the first place (use the right TagType for the category instead of 
the translated text) since the current index of the combo box for the 
categories happens to be the right TagType intentionally (as can be seen 
around line 247 of filerenamer.cpp).

With that in mind the fix I will commit will be slightly different, but I 
wouldn't have known about it if you hadn't searched further.

I do think that bug 118317 was a separate issue, even affecting en_US users 
who hadn't been running JuK for years and so the problem you were having is 
different. However I will CC: that bug in case other commenters were having 
your issue.

 - Michael Pyne
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-multimedia/attachments/20110419/140ab1de/attachment.sig>
-------------- next part --------------
kde-multimedia mailing list
kde-multimedia at kde.org

More information about the kde-multimedia mailing list