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

Localisation for Chinese #385

Closed
wants to merge 3 commits into from

Conversation

groverlynn
Copy link
Contributor

No description provided.

@noah-nuebling
Copy link
Owner

noah-nuebling commented Sep 24, 2022

@groverlynn thanks so much for your work! This is really awesome to see and I'm really excited to be adding support for Chinese to MMF soon thanks to you!

From taking a quick look over the changes, it all looks very good. I just noticed a few things:

1. Apple key fallbacks

You didn't translate the apple-key-fallback keys like<Decrease Volume key>. They will rarely be shown to users, and maybe you just made a judgement call that it's not very important, especially since there are so many of them, which I would understand. But I just want to make sure there's not a misunderstanding here. Because in the other .strings files, text being wrapped by < and > means that it's unused and will be replaced programmatically. But in the Localizable.strings file you have the apple-key-fallback values wrapped in < and >, but they still actually are being used in the UI.

It's a little confusing, sorry. I added a comment pointing this out now.

This is just to clear up the possible misunderstanding. If you don't want to translate these keys, I would still gladly merge your pull request.

2. Changes to thank you messages

After you bought the app, there are little 'thank you' messages displayed on the about tab. They consist of an emoji on the left, and some text on the right. I just made a change so that the emojis are part of the translatable text. I was planning to make that change for a while, but I only got around to it now.

It would be awesome if you included the emojis in your translations, so it all displays properly!

You can get the emojis to show up in the Localizable.strings files' comments like this:

  1. Merge the latest commits from the noah-nuebling:version-3 branch into your branch
  2. Go to your Localizable.strings file and delete all the comments above the thank you messages
    CleanShot 2022-09-25 at 00 23 16@2x
  3. Recompile the app, to have bartycrouch recreate all the comments you deleted. They will now include the emojis and some comments I added.

Note that this will only work if you have the bartycrouch command line tool installed. Otherwise you can also update the localizations without updating the comments and see what the emojis should be from the code, or the other Localizable.strings files.

Or if you give me permission to change this pull request it shouldn't be a problem for me to update this myself and I'll gladly do that.

Thanks again for your awesome contribution!

@groverlynn groverlynn deleted the branch noah-nuebling:version-3 September 28, 2022 18:14
@groverlynn groverlynn closed this Sep 28, 2022
@groverlynn groverlynn deleted the version-3 branch September 28, 2022 18:14
@noah-nuebling
Copy link
Owner

I'm also still making some additions and changes to the UI as you might have seen.
I'll try to get all the substantial changes in before the next beta (Beta 4) if you want to wait for that.

@groverlynn
Copy link
Contributor Author

@noah-nuebling
I indeed got the apple-key-fallback keys wrong. So I've fixed these. (and I'm assuming < and > doesn't matter so I've changed to their respective full-width versions which is the convention in Chinese).
I will wait for your Beta 4. Cheers

@noah-nuebling
Copy link
Owner

Okay great, sounds good!

@noah-nuebling
Copy link
Owner

noah-nuebling commented Sep 28, 2022

I'm assuming < and > doesn't matter

You're right, it doesn't matter. There is no "magic" to the < and > symbols. Just use whatever seems appropriate in Chinese. The strings show up in tooltips when you map a mouse button to a special key on an Apple keyboard. Here's an example:

CleanShot 2022-09-28 at 23 53 11@2x

If you don't have an Apple Keyboad, you can also see this by holding Option:

Bildschirm­foto 2022-09-28 um 23 46 22

Having the fallback strings wrapped in < and > is arbitrary. You might as well use [ and ]. It's a little weird, but I couldn't come up with an easy solution that is better.
If you have any ideas for improving this or if you think it would be better to do this a completely different way in Chinese, feel absolutely free!

The new San Francisco fonts can display the keyboard symbols directly, which would be much nicer thatn the literal descriptions of the keys wrapped by < and >. But I'm not sure how you could make this work on older macOS versions that don't use the San Francisco Font yet.

@groverlynn
Copy link
Contributor Author

I'm assuming < and > doesn't matter

You're right, it doesn't matter. There is no "magic" to the < and > symbols. Just use whatever seems appropriate in Chinese. The strings show up in tooltips when you map a mouse button to a special key on an Apple keyboard. Here's an example:

CleanShot 2022-09-28 at 23 53 11@2x

If you don't have an Apple Keyboad, you can also see this by holding Option:

Bildschirm­foto 2022-09-28 um 23 46 22

Having the fallback strings wrapped in < and > is arbitrary. You might as well use [ and ]. It's a little weird, but I couldn't come up with an easy solution that is better. If you have any ideas for improving this or if you think it would be better to do this a completely different way in Chinese, feel absolutely free!

The new San Francisco fonts can display the keyboard symbols directly, which would be much nicer thatn the literal descriptions of the keys wrapped by < and >. But I'm not sure how you could make this work on older macOS versions that don't use the San Francisco Font yet.

For SF Symbol, I believe you can create a web-font sort of things, or export the image. Check out the official document.

@noah-nuebling
Copy link
Owner

Thanks for your input! If I remember correctly, the problem was that you can't set custom fonts or images on tooltips. So you'd have to re-implement tooltips yourself to have it work.

@groverlynn
Copy link
Contributor Author

Thanks for your input! If I remember correctly, the problem was that you can't set custom fonts or images on tooltips. So you'd have to re-implement tooltips yourself to have it work.

Seems there is no need for special implementation but to copy the symbol (in unicode text) from SF symbol. Mac stores those symbols in the Supplementary Private Use Area-B of unicode and seems to be consistent on all MacOS.
Screenshot 2023-01-13 at 20 01 17

@noah-nuebling
Copy link
Owner

noah-nuebling commented Jan 30, 2023

Hey @groverlynn, thanks a lot for the information and for investigating this more.

I just did some testing using the SF Symbols directly in text as unicode characters, as you suggested. I tested under macOS Big Sur, which is the earliest supported version for MMF 3. At first it didn't work and just showed questionmarks instead of the SF Symbols:

IMAGE 2023-01-30 12:07:14

Then, after installing the SF Symbols app it started working:

IMAGE 2023-01-30 12:07:58

Not totally sure what's going on there.
If we can find a way to have the unicode symbols display properly on the earliest supported macOS version without having to install the SF Symbols app, that would be great!
Maybe it would work if you ship a certain font with the app or something like that?

I won't investigate this further for now, because I want to focus on other things, but if you find out anything else interesting, please let me know! Thanks!

@groverlynn
Copy link
Contributor Author

groverlynn commented Feb 26, 2023

Hey @groverlynn, thanks a lot for the information and for investigating this more.

I just did some testing using the SF Symbols directly in text as unicode characters, as you suggested. I tested under macOS Big Sur, which is the earliest supported version for MMF 3. At first it didn't work and just showed questionmarks instead of the SF Symbols:

IMAGE 2023-01-30 12:07:14

Then, after installing the SF Symbols app it started working:

IMAGE 2023-01-30 12:07:58

Not totally sure what's going on there. If we can find a way to have the unicode symbols display properly on the earliest supported macOS version without having to install the SF Symbols app, that would be great! Maybe it would work if you ship a certain font with the app or something like that?

I won't investigate this further for now, because I want to focus on other things, but if you find out anything else interesting, please let me know! Thanks!

Some random simple tests show that SF Pro and SF Compact font families, regardless of font weight, both support these symbols, not SF Mono, SF Arabic nor New York though.

To be clear, it has nothing to do with SF Symbols. Deactivating all the SF Pro and SF Compact fonts but keeping SF Symbols gives you the ToFu (?⃞) again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants