Bug 28792 - update-webkit-localizable-strings script can no longer complete
: update-webkit-localizable-strings script can no longer complete
: WebKit
: 528+ (Nightly build)
: Macintosh Mac OS X 10.5
: P1 Critical
Assigned To:
: InRadar
  Show dependency treegraph
Reported: 2009-08-27 17:19 PST by
Modified: 2009-08-28 11:35 PST (History)

patch (3.77 KB, text/plain)
2009-08-28 00:05 PST, chris fleizach
sullivan: review-
patch (12.33 KB, patch)
2009-08-28 11:06 PST, chris fleizach
sullivan: review+
Review Patch | Details | Formatted Diff | Diff


You need to log in before you can comment on or make changes to this bug.

Description From 2009-08-27 17:19:44 PST
The update-webkit-localizable-strings script, used to update the Localizable.strings file on Macintosh, can no longer complete. It fails due to this line in WebViewFactory.mm:

    return UI_STRING([ariaType UTF8String], "A description for a specified ARIA grouping role.");    

The script expects to find a quoted string literal here, not a function/method result. Since the script can't finish, Localizable.strings can't be updated for WebKit, which is a showstopper.

This line was introduced in http://trac.webkit.org/changeset/47626 on August 21, 2009.
------- Comment #1 From 2009-08-27 17:22:13 PST -------
------- Comment #2 From 2009-08-28 00:05:17 PST -------
Created an attachment (id=38719) [details]

the patch makes sure that only static strings are used in UI_STRING
------- Comment #3 From 2009-08-28 06:17:37 PST -------
(From update of attachment 38719 [details])
I don't understand why these strings should be localized, since they look like technical terms rather than natural language. Can you explain?
------- Comment #4 From 2009-08-28 07:05:11 PST -------
those strings are used for NSAccessibilityRoleDescription.

From NSAccessibility document.


    Localized, user-readable description of role, such as radio button (NSString)
------- Comment #5 From 2009-08-28 07:53:53 PST -------
(From update of attachment 38719 [details])
It seems very strange to me to use these computer style strings like ARIAApplicationLog as the group text, and yet ask localizers to translate them.

I'm going to say r=me, because the change seems fine mechanically, but I think you should discuss this with other architects of the VoiceOver application and localization of terms used by it. I am surprised that it's a good idea to include the word "ARIA" in the terms that are spoken aloud.
------- Comment #6 From 2009-08-28 08:32:15 PST -------
VoiceOver doesn't actually speak ARIAApplicationLog, it speaks the localized word "log" in this case. ARIAApplicationLog is just the key to find the right word.
------- Comment #7 From 2009-08-28 08:39:56 PST -------
How does the word "log" get into Localizable.strings? The construct UI_STRING("ARIAApplicationLog", "comment") puts "ARIAApplicationLog" into Localizable.strings.
------- Comment #8 From 2009-08-28 08:42:07 PST -------
maybe i don't understand something here

in the previous check in (r47626) I added these


     445    /* Short descriptions of WAI-ARIA content roles */ 
     446    "ARIAApplicationLog" = "log"; 
     447    "ARIAApplicationMarquee" = "marquee"; 
     448    "ARIAApplicationStatus" = "status"; 
     449    "ARIAApplicationTimer" = "timer"; 
     450    "ARIADocument" = "document"; 
     451    "ARIADocumentArticle" = "article"; 
     452    "ARIADocumentNote" = "note"; 
     453    "ARIADocumentRegion" = "region"; 
     454    "ARIALandmarkApplication" = "application"; 
     455    "ARIALandmarkBanner" = "banner"; 
     456    "ARIALandmarkComplementary" = "complementary"; 
     457    "ARIALandmarkContentInfo" = "content"; 
     458    "ARIALandmarkMain" = "main"; 
     459    "ARIALandmarkNavigation" = "navigation"; 
     460    "ARIALandmarkSearch" = "search"; 
     461    "ARIAUserInterfaceTooltip" = "tooltip";
------- Comment #9 From 2009-08-28 09:22:30 PST -------
Yeah, I think there is a misunderstanding here. In WebKit, Localizable.strings is re-generated automatically by running the script update-webkit-localizable-strings. This script looks through the source code and finds instances of the UI_STRING macro, and then creates entries for them in the Localizable.strings file. Hand-editing the file won't work, because the hand-edited entries will get clobbered the next time the script is run. So the UI_STRING macro must have the English localized string as the first parameter, and the localizer comment as the 2nd parameter.

So your patch should look more like this:

+    if ([ariaType isEqualToString:@"ARIAApplicationLog"])
+        return UI_STRING("log", "A description for a specified ARIA grouping role.");    
+    if ([ariaType isEqualToString:@"ARIAApplicationMarquee"])
+        return UI_STRING("marquee", "A description for a specified ARIA grouping role.");    


You should also re-run update-webkit-localizable-strings with this change in place, and make the updated version of Localizable.strings be part of your patch.
------- Comment #10 From 2009-08-28 09:23:16 PST -------
(From update of attachment 38719 [details])
Changing back to r- given the subsequent discussion.
------- Comment #11 From 2009-08-28 09:23:51 PST -------
Thanks for that clarification. I was unaware of the process.
------- Comment #12 From 2009-08-28 11:06:42 PST -------
Created an attachment (id=38744) [details]
------- Comment #13 From 2009-08-28 11:28:41 PST -------
(From update of attachment 38744 [details])
Looks great!
------- Comment #14 From 2009-08-28 11:35:03 PST -------