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

Introduces a key to look up a candidate in various dictionaries #406

Merged
merged 20 commits into from
Dec 27, 2023

Conversation

zonble
Copy link
Contributor

@zonble zonble commented Dec 25, 2023

The PR helps users to know about the detailed information about a candidate. When a user opens the candidate window to list all available candidates, he or she can highlight a candidate and press on the "?" key. A menu will be opened to list available dictionaries.

Screenshot 2023-12-26 at 12 14 17 AM

Screenshot 2023-12-26 at 12 14 23 AM

Then, the user can pick a dictionary service from the menu, and McBopomofo will open external web browser, dictionary app and so on accordingly. One of the options is to let the user to see the character code of the highlighted candidate.

Screenshot 2023-12-26 at 12 14 36 AM

@zonble zonble requested a review from lukhnos December 26, 2023 02:09
Copy link
Contributor

@lukhnos lukhnos left a comment

Choose a reason for hiding this comment

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

LGTM! Just a few comments on the service entry JSON and whether those need to be localized at all. Feel free to merge.

@@ -281,6 +281,10 @@ public class VerticalCandidateController: CandidateController {
newIndex = 0
}

if newIndex == UInt.max {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the same commit to OpenVanilla should be carried over here too. That is, a UInt.max check should be placed in line 297, and these three lines (284-286 currently) are dead code anyway, because newIndex is always set to 0 if newValue is UInt.max (from lines 276-282).


"MOE Dict (Holo)" = "台語萌典";

"MOE Dict (Holo)" = "客語萌典";
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: "MOE Dict (Hakka)" instead?


"MOE Dict" = "MOE Dict";

"MOE Dict (Holo)" = "MOE Dict (Holo)";
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Missing entry for "MOE Dict (Hakka)"?

"url_template": "dict://(encoded)"
},
{
"name": "MOE Dict",
Copy link
Contributor

Choose a reason for hiding this comment

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

I was wondering if this should be called "moedict.tw" since "MOE Dict" sounds like the officical MOE dictionary. Or should this simply be called "萌典" without localization just like "教育部重編國語詞典修訂本" below?

Calling the three entries 萌典、萌典(台語)、萌典(客語) also removes the need to localize them in English.

Copy link
Contributor

@lukhnos lukhnos left a comment

Choose a reason for hiding this comment

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

Thanks!

@lukhnos lukhnos merged commit 7566d5d into openvanilla:master Dec 27, 2023
1 check passed
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.

2 participants