Bug 197014

Summary: [iOS] Support multiple file selection in UIDocumentPickerViewController
Product: WebKit Reporter: Andy Estes <aestes>
Component: New BugsAssignee: Andy Estes <aestes>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, ap, bdakin, cdumez, commit-queue, ggaren, thorton, timothy, webkit-bug-importer, wenson_hsieh, yevseytsev
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Andy Estes 2019-04-17 09:28:21 PDT
[iOS] Support multiple file selection in UIDocumentPickerViewController
Comment 1 Andy Estes 2019-04-17 09:30:04 PDT
rdar://problem/49963514
Comment 2 Andy Estes 2019-04-17 09:34:20 PDT
Created attachment 367634 [details]
Patch
Comment 3 Tim Horton 2019-04-17 12:20:52 PDT
Comment on attachment 367634 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=367634&action=review

> Source/WebCore/en.lproj/Localizable.strings:68
> +/* label next to file upload control; parameter is the number of files when greater than one */
> +"%lu files" = "%lu files";

Why is the string up two lines not good enough? :D Or replace that one with this one? I don't know what types you need.
Comment 4 Andy Estes 2019-04-17 13:04:34 PDT
Comment on attachment 367634 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=367634&action=review

>> Source/WebCore/en.lproj/Localizable.strings:68
>> +"%lu files" = "%lu files";
> 
> Why is the string up two lines not good enough? :D Or replace that one with this one? I don't know what types you need.

lol, will use the other one via the handy multipleFileUploadText() in LocalizedStrings.h :)

Thanks for reviewing!
Comment 5 Andy Estes 2019-04-17 13:16:55 PDT
Created attachment 367669 [details]
Patch
Comment 6 WebKit Commit Bot 2019-04-17 15:41:14 PDT
Comment on attachment 367669 [details]
Patch

Clearing flags on attachment: 367669

Committed r244404: <https://trac.webkit.org/changeset/244404>
Comment 7 WebKit Commit Bot 2019-04-17 15:41:16 PDT
All reviewed patches have been landed.  Closing bug.
Comment 8 Alexey Proskuryakov 2019-04-18 09:39:48 PDT
> > Source/WebCore/en.lproj/Localizable.strings:68
> > +/* label next to file upload control; parameter is the number of files when greater than one */
> > +"%lu files" = "%lu files";
> 
> Why is the string up two lines not good enough? :D Or replace that one with
> this one? I don't know what types you need.

It actually isn't good at all!

Pluralization doesn't work like "1 vs. any other number" in many languages, see <http://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html>. Foundation has proper support for this.

I checked the Russian localization in shipping WebKit for macOS, and it actually uses the hack that translators apply when software lacks full localization support - it's translated to an equivalent of "Files: %d".
Comment 9 Tim Horton 2019-04-18 10:48:19 PDT
(In reply to Alexey Proskuryakov from comment #8)
> > > Source/WebCore/en.lproj/Localizable.strings:68
> > > +/* label next to file upload control; parameter is the number of files when greater than one */
> > > +"%lu files" = "%lu files";
> > 
> > Why is the string up two lines not good enough? :D Or replace that one with
> > this one? I don't know what types you need.
> 
> It actually isn't good at all!
> 
> Pluralization doesn't work like "1 vs. any other number" in many languages,
> see
> <http://www.unicode.org/cldr/charts/latest/supplemental/
> language_plural_rules.html>. Foundation has proper support for this.
> 
> I checked the Russian localization in shipping WebKit for macOS, and it
> actually uses the hack that translators apply when software lacks full
> localization support - it's translated to an equivalent of "Files: %d".

I was going to comment about this, but I don't think WebKit has a stringsdict yet? And didn't want to force bringing that up on Andy :)
Comment 10 yevseytsev 2019-04-18 13:44:49 PDT
Created bug for it https://bugs.webkit.org/show_bug.cgi?id=197070
Comment 11 Alexey Proskuryakov 2019-05-09 15:54:56 PDT
> I was going to comment about this, but I don't think WebKit has a
> stringsdict yet? And didn't want to force bringing that up on Andy :)

Actually it does, Source/WebCore/en.lproj/Localizable.stringsdict. Since all localization is done through WebCore, that's the one to use.