WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
28792
update-webkit-localizable-strings script can no longer complete
https://bugs.webkit.org/show_bug.cgi?id=28792
Summary
update-webkit-localizable-strings script can no longer complete
John Sullivan
Reported
2009-08-27 17:19:44 PDT
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.
Attachments
patch
(3.77 KB, text/plain)
2009-08-28 00:05 PDT
,
chris fleizach
sullivan
: review-
Details
patch
(12.33 KB, patch)
2009-08-28 11:06 PDT
,
chris fleizach
sullivan
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
John Sullivan
Comment 1
2009-08-27 17:22:13 PDT
<
rdar://problem/7177446
>
chris fleizach
Comment 2
2009-08-28 00:05:17 PDT
Created
attachment 38719
[details]
patch the patch makes sure that only static strings are used in UI_STRING
John Sullivan
Comment 3
2009-08-28 06:17:37 PDT
Comment on
attachment 38719
[details]
patch I don't understand why these strings should be localized, since they look like technical terms rather than natural language. Can you explain?
chris fleizach
Comment 4
2009-08-28 07:05:11 PDT
those strings are used for NSAccessibilityRoleDescription. From NSAccessibility document. NSAccessibilityRoleDescriptionAttribute Localized, user-readable description of role, such as radio button (NSString)
Darin Adler
Comment 5
2009-08-28 07:53:53 PDT
Comment on
attachment 38719
[details]
patch 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.
chris fleizach
Comment 6
2009-08-28 08:32:15 PDT
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.
John Sullivan
Comment 7
2009-08-28 08:39:56 PDT
How does the word "log" get into Localizable.strings? The construct UI_STRING("ARIAApplicationLog", "comment") puts "ARIAApplicationLog" into Localizable.strings.
chris fleizach
Comment 8
2009-08-28 08:42:07 PDT
maybe i don't understand something here in the previous check in (
r47626
) I added these trunk/WebKit/English.lproj/Localizable.strings 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";
John Sullivan
Comment 9
2009-08-28 09:22:30 PDT
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."); etc. 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.
John Sullivan
Comment 10
2009-08-28 09:23:16 PDT
Comment on
attachment 38719
[details]
patch Changing back to r- given the subsequent discussion.
chris fleizach
Comment 11
2009-08-28 09:23:51 PDT
Thanks for that clarification. I was unaware of the process.
chris fleizach
Comment 12
2009-08-28 11:06:42 PDT
Created
attachment 38744
[details]
patch
John Sullivan
Comment 13
2009-08-28 11:28:41 PDT
Comment on
attachment 38744
[details]
patch Looks great!
chris fleizach
Comment 14
2009-08-28 11:35:03 PDT
http://trac.webkit.org/changeset/47870
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug