ACHNBrowserUI icon indicating copy to clipboard operation
ACHNBrowserUI copied to clipboard

User interface localization

Open Dimillian opened this issue 4 years ago • 29 comments

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.

  • [x] English
  • [x] German
  • [x] French
  • [ ] Spanish
  • [x] Italian
  • [x] Russian
  • [ ] Dutch
  • [x] Chinese TW
  • [x] Chinese HK
  • [x] Japanese
  • [ ] Korean

Dimillian avatar May 04 '20 10:05 Dimillian

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

TheVaan avatar May 09 '20 09:05 TheVaan

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

(edit: moved list to issue)

Add / remove languages as desired.

TheVaan avatar May 10 '20 13:05 TheVaan

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?

klin0816 avatar May 14 '20 03:05 klin0816

@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

jonnyklemmer avatar May 14 '20 03:05 jonnyklemmer

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.

TheVaan avatar May 14 '20 05:05 TheVaan

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

klin0816 avatar May 14 '20 06:05 klin0816

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

mimikun avatar May 14 '20 06:05 mimikun

@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.

TheVaan avatar May 14 '20 06:05 TheVaan

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

Dimillian avatar May 14 '20 06:05 Dimillian

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

mimikun avatar May 14 '20 07:05 mimikun

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

shibotong avatar May 18 '20 03:05 shibotong

@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 avatar May 18 '20 05:05 TheVaan

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

TheVaan avatar May 18 '20 05:05 TheVaan

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 ?

MrOgeid avatar May 19 '20 15:05 MrOgeid

@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

TheVaan avatar May 19 '20 15:05 TheVaan

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

MrOgeid avatar May 19 '20 15:05 MrOgeid

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

Dimillian avatar May 19 '20 15:05 Dimillian

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

MrOgeid avatar May 19 '20 15:05 MrOgeid

@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

Dimillian avatar May 19 '20 15:05 Dimillian

@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.

MrOgeid avatar May 19 '20 16:05 MrOgeid

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

Dimillian avatar May 19 '20 16:05 Dimillian

Thanks @Dimillian !

MrOgeid avatar May 19 '20 16:05 MrOgeid

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.😬

MrOgeid avatar May 25 '20 14:05 MrOgeid

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

Dimillian avatar May 28 '20 15:05 Dimillian

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

Dimillian avatar May 30 '20 12:05 Dimillian

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 :)

Dimillian avatar May 31 '20 17:05 Dimillian

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?

rohanrk avatar Jun 19 '20 03:06 rohanrk

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.

TheVaan avatar Jun 19 '20 04:06 TheVaan

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

AndyH0ng avatar Sep 23 '20 07:09 AndyH0ng