[GH-ISSUE #2041] [Bug] Text in 'Show menu' tooltip and font size switcher didn't get translated #815

Closed
opened 2026-03-23 20:41:27 +00:00 by mirror · 2 comments
Owner

Originally created by @hyj1204 on GitHub (Mar 20, 2023).
Original GitHub issue: https://github.com/AppFlowy-IO/AppFlowy/issues/2041

Originally assigned to: @hmncube on GitHub.

Bug Description

No matter which language I select, the text for the 'Show menu' tooltip and font size switcher always appears English.

How to Reproduce

Click on the 'more' icon located in the top-right corner.

Expected Behavior

Display the texts in the language selected by the user.
If we do not have an appropriate translation yet, it is recommended to keep the text in its original English language in the corresponding JSON file until a suitable translation is available.

Operating System

macOS 13.0

AppFlowy Version(s)

0.1.1

Screenshots

'Show menu' tooltip
image

FontSizeSwitcher
image

Additional Context

No response

Originally created by @hyj1204 on GitHub (Mar 20, 2023). Original GitHub issue: https://github.com/AppFlowy-IO/AppFlowy/issues/2041 Originally assigned to: @hmncube on GitHub. ### Bug Description No matter which language I select, the text for the 'Show menu' tooltip and font size switcher always appears English. ### How to Reproduce Click on the 'more' icon located in the top-right corner. ### Expected Behavior Display the texts in the language selected by the user. If we do not have an appropriate translation yet, it is recommended to keep the text in its original English language in the corresponding JSON file until a suitable translation is available. ### Operating System macOS 13.0 ### AppFlowy Version(s) 0.1.1 ### Screenshots **'Show menu' tooltip** ![image](https://user-images.githubusercontent.com/14248245/226364532-bdb12f31-365a-4587-a92d-89d102631e16.png) **FontSizeSwitcher** ![image](https://user-images.githubusercontent.com/14248245/226366126-2388da37-5b62-4b7d-9dc1-b19bb3d4aff0.png) ### Additional Context _No response_
Author
Owner

@hmncube commented on GitHub (May 12, 2023):

@hyj1204 For this do I add the English words and then someone will translate to other languages? Also, it seems the font switcher has been translated in the latest version.
image

<!-- gh-comment-id:1545702249 --> @hmncube commented on GitHub (May 12, 2023): @hyj1204 For this do I add the English words and then someone will translate to other languages? Also, it seems the font switcher has been translated in the latest version. ![image](https://github.com/AppFlowy-IO/AppFlowy/assets/2725300/29d12e4f-c0a0-4324-9b92-c244acb9fe26)
Author
Owner

@hyj1204 commented on GitHub (May 12, 2023):

@hmncube
You can add the phrase "More options" to en.json file which has all the localized words in English.
Then Rebuild the app, this step will generate/update the Locale_Keys files.
image

After it, add a tooltip value to PopupMenuButton in the more_button.dart by using the LocaleKeys.
It may look like 'tooltip: LocaleKeys.moreAction_tooltipText.tr().If you got a isn't defined error, adding the following import will solve it.

import 'package:appflowy/generated/locale_keys.g.dart';
import 'package:easy_localization/easy_localization.dart';

I noticed that the font size part has already been linked to LocaleKey, the reason why it didn't change is lacking translation in some languages. so there is nothing that needs to be fixed.

<!-- gh-comment-id:1546039326 --> @hyj1204 commented on GitHub (May 12, 2023): @hmncube You can add the phrase "More options" to `en.json` file which has all the localized words in English. Then **Rebuild** the app, this step will generate/update the `Locale_Keys` files. ![image](https://github.com/AppFlowy-IO/AppFlowy/assets/14248245/12350a42-0a36-4d35-ae24-1366ccead5dc) After it, add a tooltip value to `PopupMenuButton` in the `more_button.dart` by using the LocaleKeys. It may look like '`tooltip: LocaleKeys.moreAction_tooltipText.tr()`.If you got a `isn't defined` error, adding the following import will solve it. ``` import 'package:appflowy/generated/locale_keys.g.dart'; import 'package:easy_localization/easy_localization.dart'; ``` I noticed that the font size part has already been linked to LocaleKey, the reason why it didn't change is lacking translation in some languages. so there is nothing that needs to be fixed.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
AppFlowy-IO/AppFlowy#815
No description provided.