Anki-Android icon indicating copy to clipboard operation
Anki-Android copied to clipboard

[Design] Inconsistent String Casing

Open NamelessGO opened this issue 2 years ago β€’ 9 comments

Current Problem

AnkiDroid utilizes Anki strings, which are typically in Title Case. However, AnkiDroid strings are predominantly in Sentence case, resulting in inconsistent strings.

Solution

Changing Title cases strings to Sentence case or vice versa (see Strings affected for title case strings)

Why use Title Case?

  • Let’s Make It Official. Looks serious, right? Exactly!
  • Grabs reader attention. Capitalized phrases stand out from the crowd, as Pieter Heyman nicely put it.
  • Keeps a nice visual rhythm. Of course, as long as the sentences are short. Stands out. Title Case differentiates title from the body text.
  • Maintains symmetry. Yet, works only for short texts (ex. Buttons, Labels)

Why use Sentence case?

  • Consistency. Easier to maintain across different platforms.
  • Clarity. Easy to navigate and skim, thank you, John Saito. (ex. Home > About us)
  • People love it. Yes, we love having human-ish conversations with apps. Casual. Gives an impression that anyone can use the product.
  • Easier to localize. Much much easier and less stressful.

Source above

Human Interface Guideline (HID)

  • GNOME HID

    • Header capitalization should be used for any headings, including headings in header bars, tab titles, and view titles. It should also be used for short control labels that do not normally form proper sentences, such as button labels, switch labels and menu items
    • Sentence capitalization should be used for labels that form sentences or that run on to other text, including labels for check boxes, radio buttons, sliders, text entry boxes, field labels and combobox labels. It should also be used for explanatory or body text, such as in dialogs or notifications
  • KDE HID:

    • Use title capitalization primarily for titles and headers, but also for command labels
    • Used in: Titles and headers on windows, dialog boxes, tabs, lists, group boxes, tree views, etc; Menu titles and menu item labels; Button labels
    • Use sentence style capitalization for text that is or could be read as a sentence, or that is part of a sentence in conjunction with other elements
    • Used in: Tooltip text; Placeholder text in text fields; Checkbox labels; Labels to the left of controls in a Form Layout; Descriptions of anything
  • Material Design 3 HID: Use sentence case, unless it is specified

    • Unless otherwise specified, use sentence-style capitalization, where only the first letter of the first word in a sentence or phrase is capitalized. All text, including titles, headings, labels, menu items, and buttons should use sentence-style capitalization.
    • Products and branded terms may also be capitalized.
  • Apple HID: No specification

Strings Affected

  • System-wide: 'Anki Card' Menu, 'Card Browser' Menu
  • Flags: Toggle Red-Purple Flag (In settings)
  • Navigation: Page Up, Page Down, Abort Learning and Sync
  • Media: Record Voice, Replay Voice, Save Recording
  • Whiteboard: Toggle Whiteboard
  • Misc: Show Hint, Show All Hints
  • About: Open Changelog
  • Card browser: Undo Change Deck, Toggle Suspend, Deck Search, Undo Updated Deck
    • Export... is using different strings from Import: Anki Collection package, Anki Deck Package, Notes in Plain Text, Cards in Plain Text
  • Main Screen: Delete Deck undone, Question Format, Answer Format, Keep Editing, Filtered Deck
  • Statistics: Future Due, Card Counts, Review Intervals, Card Stability, Card Difficulty. Card Revivability, Hourly Breakdown, Answer Buttons
  • Deck options: Daily Limits, New Cards, Display Order, Auto Advance, Add Preset, Clone Preset, Rename Preset, Save to all Subdecks, Optimize All Presets
  • Card Browser Appearance, markdown (not sure where it is)

For Statistics and Deck Options: They are in the gray zone for me, not sure if they should be sentence style or leave as it is

NamelessGO avatar Mar 03 '24 19:03 NamelessGO

I agree we're inconsistent and we need to discuss this. Thank you so much for the report and the effort you've put into this.

Our current inconsistency is the worst of the two options for a user's perspective.

Material 3 is what we're aiming towards in AnkiDroid

Use sentence case

Unless otherwise specified, use sentence-style capitalization, where only the first letter of the first word in a sentence or phrase is capitalized. All text, including titles, headings, labels, menu items, and buttons should use sentence-style capitalization.

Products and branded terms may also be capitalized.

https://m3.material.io/foundations/content-design/style-guide/ux-writing-best-practices#fc5c2a78-f4bf-4d42-bdac-42ff80391129

~~We can't handle this change via .toSentenceCase() or similar: proper nouns/nouns in German would be incorrectly handled.~~

~~=> I believe if we use Sentence case, we will be unable to use most of Anki Desktop's strings for titles/menus (even if a string is 1 word in English, it may be 2 in French)~~


I weakly believe we should stick to the system string guidelines, even if it means more work (duplicating strings & potential infrastructure to copy from the Anki Desktop source strings)

david-allison avatar Mar 03 '24 19:03 david-allison

I also prefer sentence casing in general. I suggest trying to check what is the position of Anki about that since it has been using title casing for many years.

Overall, I prefer not to duplicate strings from there since things may be translated differently between clients, and that kind of inconsistency is worse to me than having a different casing style.

For the strings that we are in control, the change is welcome IMO

BrayanDSO avatar Mar 03 '24 21:03 BrayanDSO

We can't handle this change via .toSentenceCase() or similar: proper nouns/nouns in German would be incorrectly handled.

=> I believe if we use Sentence case, we will be unable to use most of Anki Desktop's strings for titles/menus (even if a string is 1 word in English, it may be 2 in French)

I'm fairly sure title case is only a thing in English, so other languages could be ignored for this.

eginhard avatar Mar 03 '24 21:03 eginhard

@eginhard I was not aware of this, thank you!!!

This makes the decision a lot easier I feel:

Suggestion:

  • Sentence case
  • Use Anki Desktop for everything aside from the English which has an AnkiDroid specific override. Nothing needs to go to CrowdIn. Either hardcode the English as XML or a Kotlin String
    • XML preferred
  • Extension: test the provided English against the value in TR to be sure updates to Anki Translations don't cause a mismatch

david-allison avatar Mar 03 '24 21:03 david-allison

Hello πŸ‘‹, this issue has been opened for more than 3 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like still searching for solutions and if you found one, please open a pull request! You have 7 days until this gets closed automatically

github-actions[bot] avatar Jun 16 '24 09:06 github-actions[bot]

I'd love working on this issue! Could you please assign it to me?

harshit4311 avatar Aug 04 '24 09:08 harshit4311

Has anyone proposed to always use Sentence case in Anki/upstream? This is starting to look like busywork to me.

BrayanDSO avatar Aug 04 '24 11:08 BrayanDSO

I don't think anybody did. I can start a post and ping dae, should I? (It's better for both sides to be consistent in casing, rather than doing all this).

brishtibheja avatar Aug 15 '24 17:08 brishtibheja

Google Chrome isn't consistent within itself, let alone across a mobile app and a Desktop app:

Screenshot 2024-08-15 at 21 10 00

I'm fine with this being a continual issue on our side. We have consistent guidelines (Material naming) and we should match it, but it won't kill us if this is a gradual process, or when a few items don't meet the standard.

Desktop UIs have different platform guidelines than Android. That's expected and isn't a bug.

We have much more capacity for small tasks such as this to be listed as https://github.com/ankidroid/Anki-Android/labels/Good%20First%20Issue%21

macOS uses title case. Don't ping dae, he has hundreds of things to deal with, let him focus on things which are higher impact. It's FINE for Desktop & mobile strings to differ in casing.

david-allison avatar Aug 15 '24 20:08 david-allison

@NameLessGO Is this resolved in the latest alpha?

david-allison avatar Oct 02 '24 14:10 david-allison

@david-allison Its considerably better than before, feel free to close it

These are all the strings (yes, all) that has Title Case in 2.19beta4, mostly just listing them for reference, not thinking much if they need or not to be changed

Outdated, check the initial post for affected strings

NamelessGO avatar Oct 02 '24 16:10 NamelessGO

Hello πŸ‘‹, this issue has been opened for more than 3 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like still searching for solutions and if you found one, please open a pull request! You have 7 days until this gets closed automatically

github-actions[bot] avatar Dec 31 '24 16:12 github-actions[bot]

Hello πŸ‘‹, this issue has been opened for more than 3 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like still searching for solutions and if you found one, please open a pull request! You have 7 days until this gets closed automatically

github-actions[bot] avatar Apr 08 '25 04:04 github-actions[bot]

"Replay media" is called "Play media" in the control settings.

ZornHadNoChoice avatar Jun 24 '25 02:06 ZornHadNoChoice

@NamelessGO we can quickly modify strings in the Anki pages as well

Could you provide a couple of examples on one page, and I'll get a framework set up to fix them

david-allison avatar Jul 30 '25 07:07 david-allison

https://github.com/ankidroid/Anki-Android/pull/19188#discussion_r2331246872

This is a library produced by a contributor.

The title is incorrectly cased:

- Color Picker
+ Color picker

Could you add a minor TODO on the 'sentence case' issue to fix this, either in our code, or in theirs

BrayanDSO avatar Sep 09 '25 00:09 BrayanDSO