Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User interface localization #68

Open
8 of 11 tasks
Dimillian opened this issue May 4, 2020 · 29 comments
Open
8 of 11 tasks

User interface localization #68

Dimillian opened this issue May 4, 2020 · 29 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed in progress Localization

Comments

@Dimillian
Copy link
Owner

Dimillian commented May 4, 2020

Without even talking about the data, we need to localize at least the UI.
There ton of Text constructed with variable in the middle of the string and I don't think it's a good pattern to have.
Anyway let's look into it. Never localized a SwiftUI app yet.

  • English
  • German
  • French
  • Spanish
  • Italian
  • Russian
  • Dutch
  • Chinese TW
  • Chinese HK
  • Japanese
  • Korean
@Dimillian Dimillian added the help wanted Extra attention is needed label May 4, 2020
@TheVaan
Copy link
Collaborator

TheVaan commented May 9, 2020

First steps in #92
I‘m going to continue my work. You may give this issue an „in progress“ label.

Dimillian added a commit that referenced this issue May 10, 2020
* Changes due to code review

* Initial draft of localization

* localization progress:
- more text strings added to english localization
- translated Dashboard, Settings, AC Helper+, About to German
- modified a few helper classes for localization support (needs review!)
- changed DateFormatter to localizable date formats

* Translated ActiveCrittersView to German

* improved localization files
- sorted entries of Subscribe-, About- and SettingsView
- removed obsolet entries

* more German translation
- Tabbar: changed My Stuff to Collection
- CollectionView: changed name to "Collection" (same name as in tab bar)
- translated UserListView and CollectionView

* translated ItemList to German

* missed ItemRowView in last commit

* translated Shared View to German

okay, only SearchView has text inside that needs to translate... thank you for already making it LocalizedStringKey <3

* removed dashboard folder due to corrupted merge

* translated Turnips to German - Part I

* Translated Turnips Chart to German

* Translated Turnips to German part II (turnips.exchange View; disabled but strings are there)

* translated Villagers to German

* translated Listings and Categories to German

* Fixes

Co-authored-by: Thomas Ricouard <ricouard77@gmail.com>
@TheVaan
Copy link
Collaborator

TheVaan commented May 10, 2020

Let us create a check-list in the issue (maybe someone can copy paste):

(edit: moved list to issue)

Add / remove languages as desired.

Dimillian added a commit that referenced this issue May 11, 2020
Dimillian pushed a commit that referenced this issue May 11, 2020
@klin0816
Copy link
Contributor

I am able to provide ZH_TW Chinese localization but I am not good at Swift
Is that any template that I can fill in the translation?

@jonnyklemmer
Copy link

@klin0816 here's the "template" file you use for Localization in iOS:
https://github.com/Dimillian/ACHNBrowserUI/blob/master/ACHNBrowserUI/ACHNBrowserUI/en.lproj/Localizable.strings

so for example replacing
"music" = "Music";
with
"music" = "音樂";

I'm sure if you were able to do that it'd help @TheVaan out

@TheVaan
Copy link
Collaborator

TheVaan commented May 14, 2020

Edit: I didn't saw the pull request, so you can ignore most of my tutorial how to do it, but as it could be helpfull for others I will let it as it is. You can read it anyway, because there are some hints that you missed in your PR (@Dimillian already commented this in your pull request)

Original:
@klin0816 That would be awesome! As @jonnyklemmer mentioned, there are no Swift skills necessary. We changed the way translation works a little bit - the linked English localization file is not complete.

You have to choose between two ways:

First:

  • fork repo, navigate to /ACHNBrowserUI/ACHNBrowserUI
  • create a folder named zh_TW.lproj
  • copy and paste the files from the folder de.lproj to your new folder
  • to localize Localizable.strings:
    • the file contains hundreds of lines with "English string" = "German string"; (left: key, right: value)
    • please don't translate the comment line, because they help us to navigate through the file
    • just forget what I have written in German, simply translate what you finde in the key into the value
    • %@ (string) and %lld (number) are variables that should be inside your translation as well
    • there are 4 special keys, that can not be translated directly from the key: look into en.lproj/Localizable.strings to see the English value for the keys and insert translation into your file
    • one more "special thing": underneath // CategoryRow are categories with lowercase initial letter, I don't know how this is in Chinese but we use capital letter in the beginning because these strings are used as title in some views so the localization should also be capitalized (if necessary in your language)
  • to localize InfoPlist.strings:
    • this one is simple, here you only have to write the description that is shown when the app asks for access rights to photos. So you need to translate the following: "Save images like furniture or generated images from the share function" and replace the German value with yours

Second:

  • I create you a gist with all strings inside that need to be translated, included the English strings for keys that are not directly localize because they are abstract
  • you create a gist with all localized strings inside
  • I push it to the repo

I would prefer the first way, because I don't want to steel you a contributor entry to the app. Translation costs time, that should be honored!

One tipp: Use nookipedia to find translation of villagers name. Each villager has an information box with all known names in different languages.

@klin0816
Copy link
Contributor

@TheVaan Thanks for your guide anyway.
I will try to complete the translation ASAP.

@mimikun
Copy link
Contributor

mimikun commented May 14, 2020

Hello.
I want to Japanese Localization.
Would you tell me how to do it?

@TheVaan
Copy link
Collaborator

TheVaan commented May 14, 2020

@mimikun that's great! Thank you! You can follow the tutorial I posted above. Use as name for your folder ja.lproj - you don't need Xcode, it can be done with any editor, case the strings file is plain UTF-8.

@Dimillian
Copy link
Owner Author

Dimillian commented May 14, 2020

Or UTF-16 in case of Japanese/Chinese, and it works. Just pulled the Chinese items and now we have it in the app @klin0816 :)
Screenshot 2020-05-14 at 08 42 28

Screenshot 2020-05-14 at 08 44 45

@mimikun
Copy link
Contributor

mimikun commented May 14, 2020

@TheVaan
Thanks.
I'll try to complete the translation ASAP.

Dimillian added a commit that referenced this issue May 14, 2020
@Dimillian Dimillian changed the title Localization User interface localization May 14, 2020
@shibotong
Copy link
Contributor

I am able to provide “Chinese Simplified” and I am familiar with swift. But there is no “Chinese Simplified” option in your comments☹️

@TheVaan
Copy link
Collaborator

TheVaan commented May 18, 2020

@kartbnb I can add it. The amount of Chinese language variants is not that transparent to me 😅
You are welcome to create a pull request with translated data!

@TheVaan
Copy link
Collaborator

TheVaan commented May 18, 2020

You have two options:

  • simply add the folder then import the localization; file doesn’t have to be translated at this point, it only has to exists (or @Dimillian can import)
  • add a new localization to Localizable.Strings via menu

@MrOgeid
Copy link
Contributor

MrOgeid commented May 19, 2020

Hi, I can provide the Italian localization, if anybody isn't working on it just yet. 😀 The folder name for the Italian language is it_IT.lproj ?

@TheVaan
Copy link
Collaborator

TheVaan commented May 19, 2020

@MrOgeid this would be awesome! There is no one translating to Italian (as far as we know). The folders name has to be it.lproj

@MrOgeid
Copy link
Contributor

MrOgeid commented May 19, 2020

@TheVaan Ok! Thank you for the correct folder's name! I'll try to translate all the string as soon as possible!

@Dimillian
Copy link
Owner Author

And for items and villagers, they should already display in Italian. You can confirm @MrOgeid ?

@MrOgeid
Copy link
Contributor

MrOgeid commented May 19, 2020

@Dimillian Villager's names are displaying in Italian but I see the items in the Catalog in English.

@Dimillian
Copy link
Owner Author

Dimillian commented May 19, 2020

@MrOgeid On latest commit I've enable Italian so you'll find the correct folder and file. And it also enable Italien items :)
Simulator Screen Shot - iPhone 8 - 2020-05-19 at 17 59 41

@MrOgeid
Copy link
Contributor

MrOgeid commented May 19, 2020

@Dimillian Sorry, probably I didn't understand.😅 I don't have access right know to Xcode as I'm not a very expert software developer, I'm more a graphic designer and copywriter.

@Dimillian
Copy link
Owner Author

Well if you start your translation from the last commit, you'll find the It.lproj folder with the file ready :)

@MrOgeid
Copy link
Contributor

MrOgeid commented May 19, 2020

Thanks @Dimillian !

@MrOgeid
Copy link
Contributor

MrOgeid commented May 25, 2020

Hi @Dimillian I translated in Italian all the strings from Localizable.strings in the "de.lproj" folder into the same file in the "it.lproj" folder. But I'm not quite sure if I made a correct pull request.😬

ericlewis pushed a commit to ericlewis/ACHNBrowserUI that referenced this issue May 26, 2020
ericlewis pushed a commit to ericlewis/ACHNBrowserUI that referenced this issue May 26, 2020
ericlewis pushed a commit to ericlewis/ACHNBrowserUI that referenced this issue May 26, 2020
ericlewis pushed a commit to ericlewis/ACHNBrowserUI that referenced this issue May 26, 2020
@Dimillian
Copy link
Owner Author

Congrats to @mimikun for adding japanese in #136 !!

@Dimillian
Copy link
Owner Author

Added credits in our readme :) https://github.com/Dimillian/ACHNBrowserUI#localizations-credits

@Dimillian
Copy link
Owner Author

I'll try to tag on this issue everything I'm adding to French localization (which should be everything we have to localize) so it give a change to anyone who wants to updated their localization file to do so :)

TheVaan added a commit that referenced this issue Jun 1, 2020
@TheVaan TheVaan pinned this issue Jun 1, 2020
TheVaan added a commit that referenced this issue Jun 8, 2020
- added new shadow sizes
- added missing locations
#68
@rohanrk
Copy link

rohanrk commented Jun 19, 2020

I figure this thread is better than opening a new issue but there are quite a few strings that are in other languages that aren't in the English file (e.g: "Friendly Reminder") Should the English strings file be expanded?

@TheVaan
Copy link
Collaborator

TheVaan commented Jun 19, 2020

No. Swift uses the key as translation if there is no localization. So we only add a key to the English localization if it is an unreadable key.

@AndyH0ng
Copy link

I think I'm done with Korean one. Is there anything missing I have to do?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed in progress Localization
Projects
None yet
Development

No branches or pull requests

11 participants