Bug 111398

Summary: [GTK] Enable translations for WebKit2
Product: WebKit Reporter: Gustavo Noronha (kov) <gustavo>
Component: New BugsAssignee: Gustavo Noronha (kov) <gustavo>
Status: RESOLVED FIXED    
Severity: Normal CC: cgarcia, mrobinson
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Enable translation for WebKit2GTK+
none
Patch for EWS
none
Patch for EWS
none
Patch none

Description Gustavo Noronha (kov) 2013-03-04 19:59:32 PST
[GTK] Enable translations for WebKit2
Comment 1 Gustavo Noronha (kov) 2013-03-04 20:15:25 PST
Created attachment 191386 [details]
Enable translation for WebKit2GTK+

Something that we might want to consider: custom rule that installs .mo files a second time but with a different name for WebKit2GTK+, which would need adjusting our usage of GETTEXT_PACKAGE as well, but would allow having different versions of wk1gtk and wk2gtk installed. I am not sure if it's really useful to have this flexibility - the Debian package sure would build both from the same source, so there would always be the same version of both in the archive, in addition, sharing is a good thing. But... something that needs considering.
Comment 2 Gustavo Noronha (kov) 2013-03-05 06:34:38 PST
Created attachment 191484 [details]
Patch for EWS
Comment 3 Martin Robinson 2013-03-05 07:38:25 PST
Do you also need to update the paths listed in POTFILES.in? I think you can tell if it's working properly by running intltool-update -m from the directory containing POTFILES.in.
Comment 4 Gustavo Noronha (kov) 2013-03-05 07:48:15 PST
Unsure why the patch is not getting applied.
Comment 5 Gustavo Noronha (kov) 2013-03-05 07:58:42 PST
(In reply to comment #3)
> Do you also need to update the paths listed in POTFILES.in? I think you can tell if it's working properly by running intltool-update -m from the directory containing POTFILES.in.

Good catch! I haven't been able to properly test this locally because everything complains libc doesn't know the locale and it falls back to C, my system apps all work, though, I asked in #gnome-hackers but got no reply, let me know if any of you has a clue what may be causing this in my jhbuild env?
Comment 6 Martin Robinson 2013-03-05 08:05:39 PST
(In reply to comment #5)
> Good catch! I haven't been able to properly test this locally because everything complains libc doesn't know the locale and it falls back to C, my system apps all work, though, I asked in #gnome-hackers but got no reply, let me know if any of you has a clue what may be causing this in my jhbuild env?


Sorry. I'm pretty clueless about translations except for the basics about getting intltool working.
Comment 7 Gustavo Noronha (kov) 2013-03-05 08:25:37 PST
Created attachment 191501 [details]
Patch for EWS
Comment 8 Gustavo Noronha (kov) 2013-03-05 08:27:00 PST
(In reply to comment #6)
> Sorry. I'm pretty clueless about translations except for the basics about getting intltool working.

Guess I'll make dist and try it out on a debian package ;)
Comment 9 Gustavo Noronha (kov) 2013-03-05 08:47:43 PST
I tested applying the patch locally with svn-apply and the error seems to be sr@latin.po and sr.po cause failed hunks, I'll see if I can figure out what that is.
Comment 10 Gustavo Noronha (kov) 2013-03-06 18:39:01 PST
Created attachment 191886 [details]
Patch

This has been properly tested, it turns out what was causing my "locale not supported" issues was setting LC_ALL explicitly in the wk2 process launcher. I believe that should not be needed, let me know if there's some use case that was supposed to support that I should test. I don't think the EWS will be able to apply this one as well, I haven't figured out why the sr*.po files cause trouble, I think we'll have to land this one without the help of the EWS and CQ... let me know if it looks OK to you
Comment 11 Martin Robinson 2013-03-06 19:13:43 PST
Comment on attachment 191886 [details]
Patch

Looks good, apart from the fact that the paths in the po files are incorrect. Maybe there's a way to automatically fix those. :(
Comment 12 Gustavo Noronha (kov) 2013-03-07 08:31:02 PST
Comment on attachment 191886 [details]
Patch

http://trac.webkit.org/changeset/145081