Commit graph

43 commits

Author SHA1 Message Date
VictoriousRaptor
b869eb8d1d Avoid adding unnecessary space and improve unit test 2025-12-07 18:50:54 +08:00
Jack251970
8c56c0bddf Fix logic 2025-07-14 19:30:16 +08:00
Jack251970
6317d0eec6 Reload on all settings change 2025-07-14 19:29:12 +08:00
Jack251970
071b75bcb5 Improve code quality 2025-07-14 09:12:14 +08:00
VictoriousRaptor
2316c36a05 Improve performance and readablility 2025-07-13 23:32:53 +08:00
VictoriousRaptor
4c560210cd More specific exception types for better error handling 2025-07-13 19:37:42 +08:00
VictoriousRaptor
130202108c Add UI for double pinyin options 2025-07-13 19:09:40 +08:00
VictoriousRaptor
ebcd7d5915 Fix ShouldTranslate() logic
- Check settings or it won't work  as expected
2025-07-13 19:01:59 +08:00
VictoriousRaptor
fdbb183064 Remove readonly to reload correctly 2025-07-13 19:00:31 +08:00
VictoriousRaptor
d9e89ad610 Refactor TranslationMapping class
- Always add index to mapping rather than only Chinese characters
- Simplify mapping algorithm
- Add unit test for TranslationMapping
2025-07-13 16:07:14 +08:00
VictoriousRaptor
100f753e9b Fix ShouldTranslate() logic 2025-07-13 16:07:14 +08:00
VictoriousRaptor
1bc80d5dd9 Fix translated length 2025-06-19 21:52:15 +08:00
VictoriousRaptor
d2dc307bc0 Fix logic of ShouldTranslate() 2025-06-19 20:06:01 +08:00
VictoriousRaptor
64a3aa583f Fix Off-by-one in index mapping when consecutive Chinese chars
Found by code rabbit
2025-06-19 19:29:50 +08:00
VictoriousRaptor
4b6231ba8b Extract methods for readability 2025-06-14 22:22:25 +08:00
VictoriousRaptor
4fb2e3d14e Fix translation mapping logic 2025-06-14 16:34:11 +08:00
VictoriousRaptor
818aac715e Use lookup table to translate full pinyin to double pinyin 2025-06-14 14:32:00 +08:00
VictoriousRaptor
b31a7408d3 Simple refactor 2025-06-13 23:39:14 +08:00
VictoriousRaptor
fba42fff17 Fix transaltion logic 2025-06-13 23:23:39 +08:00
Jack251970
f5fd6b569c Use ReadOnlySpan instead 2025-04-10 09:56:27 +08:00
Jack251970
5be732d533 Use var when neccessary 2025-04-05 23:04:12 +08:00
Jack251970
a8a305fce0 Improve code quality 2025-04-05 23:02:28 +08:00
Jack251970
9e8a950580 Fix build issue & Improve code quality 2025-04-05 23:01:09 +08:00
Jack Ye
c8a9e5e947
Merge branch 'dev' into double-pin 2025-04-05 22:03:08 +08:00
Jack251970
1b76a2bc1a Use dependency injection for all services 2025-01-12 19:45:36 +08:00
VictoriousRaptor
b816d1b866 Remove unused key in pinyin alphabet 2024-06-02 15:21:04 +08:00
VictoriousRaptor
b10a6e19df Capitalize first letter 2024-06-02 15:18:24 +08:00
VictoriousRaptor
f673000d67 Fix ShouldTranslate() 2024-06-02 15:00:45 +08:00
VictoriousRaptor
a2efa11699 Merge DoublePinAlphabet logic 2024-06-02 15:00:45 +08:00
VictoriousRaptor
b1cb852673 Extract classes 2024-06-02 15:00:45 +08:00
VictoriousRaptor
46d49d8fdf Only translate when string is double pinyin 2024-06-02 15:00:45 +08:00
Vic
ce6a664da7 fix typo 2022-11-16 23:35:42 +08:00
Vic
f17571e835 Fix alphabet translation logic 2022-11-16 23:32:27 +08:00
Jeremy Wu
74f1b05257 make map variable more clear + formatting 2021-01-28 20:41:33 +11:00
Jeremy Wu
81733d35a6 fix formatting 2021-01-28 14:05:09 +11:00
张弘韬
75b99415eb Use Binary Search instead of Linear search to reduce time complexity.
Add Key Property for debugging.
2020-12-26 00:29:35 +08:00
张弘韬
b7a0ada60b Add Mapping to original string after translation. Not sure about the performance, but seems satisfying.
It requires at most n times loop (n: number of translated charater) mapping once.
2020-12-22 21:53:59 +08:00
Jeremy Wu
4c773dbaa1 clean up, no code changes 2020-12-14 21:21:48 +11:00
弘韬 张
64d67c1aa5 Update PinyinAlphabet.cs
optimize Chinese character check logic

Co-Authored-By: ToolGood <toolgood@qq.com>
2020-12-12 14:55:41 +08:00
弘韬 张
d64b4b5b0c Change the way getting acronym 2020-12-11 22:20:09 +08:00
弘韬 张
aaa938191a Manually add sapce to only the cinese character and the surrounding. 2020-12-11 22:08:46 +08:00
弘韬 张
eaf3267353 Add space for pinyin translation 2020-12-08 19:48:42 +08:00
弘韬 张
eb736562fc Change the Alphabet Name to allow future expansion 2020-11-01 18:07:35 +08:00
Renamed from Flow.Launcher.Infrastructure/Alphabet.cs (Browse further)