Skip to content

Conversation

@guanglinn
Copy link
Contributor

@guanglinn guanglinn commented Dec 15, 2025

Fix this issue #2701 - Priority can not be removed but set to (无) on priority None is selected when application language is Simplified Chinese.

@guanglinn guanglinn changed the title Fix priority can not be removed when priority None is selected under Chinese language To-Do: Fix priority can not be removed under Chinese language Dec 15, 2025
@guanglinn guanglinn changed the title To-Do: Fix priority can not be removed under Chinese language To-Do: Fix priority can not be removed in Simplified Chinese Dec 15, 2025
MarkorDialogFactory.showPriorityDialog(getActivity(), selTasks.get(0).getPriority(), (priority) -> {
setPriority(priority.length() == 1 ? priority.charAt(0) : TodoTxtTask.PRIORITY_NONE);
boolean isPriority = priority.length() == 1 && TextCasingUtils.isEnglishLetter(priority.charAt(0));
setPriority(isPriority ? priority.charAt(0) : TodoTxtTask.PRIORITY_NONE);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

In many languages, the length of the word None (Nichts, Aucune, なし, ...) is greater than 1.
But in Simplified Chinese, this word was translated as a Chinese character , which has a length of 1, so the previous logic would consider it as an letter representing priority (A, B, C, ...).

@guanglinn guanglinn changed the title To-Do: Fix priority can not be removed in Simplified Chinese To-Do: Fix priority can not be removed when app language is Simplified Chinese Dec 15, 2025
@guanglinn guanglinn closed this Dec 22, 2025
@guanglinn
Copy link
Contributor Author

There is a more robust solution by @harshad1.
See pull/2703#discussion_r2625655435

@gsantner gsantner added the bug label Jan 8, 2026
@gsantner gsantner linked an issue Jan 8, 2026 that may be closed by this pull request
4 tasks
@guanglinn guanglinn deleted the todo_priority branch January 8, 2026 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot remove priority in todo.txt under language (中文,中国)

2 participants