Commit Graph

18 Commits

Author SHA1 Message Date
zonble e17d06fd2a Fixes the cursor index when choosing candidates. 2022-01-28 01:58:25 +08:00
zonble 7e2d3df5ba Prevents users from adding custom phrases with more than 6 characters.
Also fixes typos.
2022-01-19 00:49:50 +08:00
zonble d2c039c42d Notifies the users it is not suggested to add phrase when model is converted. 2022-01-18 22:19:25 +08:00
zonble 8249c612ff Adds a validator for candidate keys in the preference window. 2022-01-16 23:33:35 +08:00
zonble 136ac34f22 Introduces in-place phrase replacement.
Since we have implemented the functions to add and exlcude phrases, the
commit allows users to use a table to change the output of a phrase
without changing its BPMF reading and score, when the "phrase replacement"
mode is on.

It could help users to switch a specific input scenario and the ordinary
one. For example, if a user wants to work on financial Chinese numbers
like 壹、貳、參, he or she may want the characters to have higher score
as the normal numbers like 一、二、三. The commit can let the users to
temporarily replace 一、二、三 to 壹、貳、參 by just turn on "phrase
replacement" mode and prepare a custom table.

The conversion is not done on the output phase like how we do
Traditional/Simplified Chinese conversion. What the phrase replacement
table does is to slightly modify the language model. The replacement
takes place on walking the nodes and candidates list.

A user can enable the mode and edit the table from the input menu. Since
the function is quite advanced, the menu items are hidden until the user
holds the option key.

The table is a plain text file. Each line contains a "from" and "to".
For example

```
一 壹
```

However, if the user also want all other phrase contain 一 to become 壹,
all of the phrases have to be built into the table

```
一百 壹佰
一千 壹仟
一萬 壹萬
一百萬 壹百萬
```
2022-01-15 06:23:09 +08:00
zonble d4772ffa99 Adds notifier UI to notify user Chinese conversion on/off. 2022-01-13 23:38:56 +08:00
zonble a7e38b5b2d Fine-tunes tooltip UI. 2022-01-13 22:00:29 +08:00
zonble 4c1781d970 Renames half-size to half-width. 2022-01-13 19:59:49 +08:00
zonble 232a944953 Implements half-size punctuations. 2022-01-13 17:07:22 +08:00
zonble cbd21cbe1d Updates localization. 2022-01-12 01:10:39 +08:00
zonble 75a0f68a9c Fixes the bug that I forgot to create the user phrases folder.
There was a legacy user override model which creates a folder and a
plist file. If a user uses McBopomofo for years, the folder would
exist. However, when the old override model was removed, I forgot
to create the folder for the new user phrase file.

The bug would let the users with new installation of McBopomofo unable
to add user phrases.
2022-01-10 21:59:18 +08:00
zonble a5247d958c Makes it able to reload user phrases. 2022-01-09 08:38:32 -08:00
Lukhnos Liu 75b4bfac31 Localize new strings
Also fine-tune the Chinese Conversion menu item text.
2021-11-23 19:04:42 -08:00
zonble 723a8402ab Fixes typos. 2021-11-11 00:14:49 +08:00
Lukhnos Liu 56dbbbc3b7 Delete UpdateNotificationController
This unifies the version update checker's UI. It also allows us to show
detailed info for a new version.
2020-10-18 12:48:15 -07:00
Lukhnos Liu 3bc70769df Show no update available when checking explicitly
This imports OpenVanilla's OVNonModalAlertWindowController for the
alerts.
2020-10-18 12:48:14 -07:00
Lukhnos Liu b56508c55c Add a debug menu item for checking updates 2014-05-16 21:16:39 -07:00
Lukhnos Liu 37f31364b5 Project reorganization.
This commit:

* Creates a new top-level Xcode project file
* Renames remaining Lettuce (the original codename) uses to McBopomofo
* Renames English.lproj (the old style locale name) to en.lproj
2012-09-08 19:28:15 -07:00