Skip to content

fix(ios): adds i18n for some error alerts#4577

Merged
jahorton merged 3 commits intofix/ios/2197-app-browser-pkg-downloadsfrom
fix/ios/unlocalized-error-strings
Mar 4, 2021
Merged

fix(ios): adds i18n for some error alerts#4577
jahorton merged 3 commits intofix/ios/2197-app-browser-pkg-downloadsfrom
fix/ios/unlocalized-error-strings

Conversation

@jahorton
Copy link
Copy Markdown
Contributor

@jahorton jahorton commented Mar 3, 2021

I identified a few escapees during work on #4568; time to round 'em up and let localization happen.

Note: is set as a child PR of #4568 due to high-proximity changes, along with one addition therein to highlight the need for this fix.

Copy link
Copy Markdown
Member

@mcdurdin mcdurdin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, although I don't understand why the two Localizable.strings are both empty files?

@jahorton
Copy link
Copy Markdown
Contributor Author

jahorton commented Mar 3, 2021

LGTM, although I don't understand why the two Localizable.strings are both empty files?

There's... some sort of git setting necessary to override its defaults. Seems to think those plain-text files are actually binary for some reason.

@mcdurdin
Copy link
Copy Markdown
Member

mcdurdin commented Mar 3, 2021

There's... some sort of git setting necessary to override its defaults. Seems to think those plain-text files are actually binary for some reason.

https://stackoverflow.com/a/21020607/1836776

@mcdurdin
Copy link
Copy Markdown
Member

mcdurdin commented Mar 3, 2021

It thinks they are binary because they are UTF-16LE, which it doesn't recognise by default.

@darcywong00
Copy link
Copy Markdown
Contributor

@jahorton - can you see if converting the .strings files to UTF-8 works?

From an SO thread there's a reference to Cocoa documentation about Xcode being able to copy and convert back to UTF-16

https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/LoadingResources/Strings/Strings.html

@mcdurdin
Copy link
Copy Markdown
Member

mcdurdin commented Mar 4, 2021

@jahorton you'll also need to convert the existing strings files from UTF-16 to UTF-8.

@jahorton
Copy link
Copy Markdown
Contributor Author

jahorton commented Mar 4, 2021

Took a bit to find it, but Xcode has this:

Screen Shot 2021-03-04 at 9 09 00 AM

It doesn't show unless you've clicked within the file, for some reason. The other caveat... is that it simply doesn't work. "Convert" did literally nothing (even when applied in the UTF-8 direction). Had to use an online tool instead. Yet another case of "thanks, Apple!"

@mcdurdin
Copy link
Copy Markdown
Member

mcdurdin commented Mar 4, 2021

Had to use an online tool instead.

VSCode is my go-to for file encoding conversion, "Change file encoding" command

@jahorton
Copy link
Copy Markdown
Contributor Author

jahorton commented Mar 4, 2021

While the files still aren't viewable on this PR, using "View File" no longer talks about the file being binary, so it should be fixed for the future now.

@jahorton jahorton merged commit 14eace1 into fix/ios/2197-app-browser-pkg-downloads Mar 4, 2021
@jahorton jahorton deleted the fix/ios/unlocalized-error-strings branch March 4, 2021 02:38
@keyman-server
Copy link
Copy Markdown
Collaborator

Changes in this pull request will be available for download in Keyman version 14.0.253-beta

@keyman-server
Copy link
Copy Markdown
Collaborator

Changes in this pull request will be available for download in Keyman version 15.0.19-alpha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants