I18n: use IFACE_ to translate status bar info & viewport statistics #117234

Merged
Bastien Montagne merged 4 commits from pioverfour/blender:dp_i18n_translate_status_bar_with_interface into main 2024-02-07 11:18:02 +01:00
Member

Although the information displayed in the status bar is strictly
speaking reports, it makes sense to translate them using the Interface
setting instead of Reports, as the tool names and stats terms are
also translated in other UI places (toolbar, menus).

This change includes status bars statistics and keymaps, and viewport
statistics.

The change is quite extensive as it is all or nothing. Translating
keymaps using Interface means some status messages will include them
indirectly, and thus cannot use Reports without having a weird mix of
original and translated words. In turn, having only some messages
translated would be even more confusing.
The result is that all messages related to input are now translated with
Interface, which I think also makes sense.

Discussed as a followup to !116804.


cc. @gtitaev

Although the information displayed in the status bar is strictly speaking reports, it makes sense to translate them using the Interface setting instead of Reports, as the tool names and stats terms are also translated in other UI places (toolbar, menus). This change includes status bars statistics and keymaps, and viewport statistics. The change is quite extensive as it is all or nothing. Translating keymaps using Interface means some status messages will include them indirectly, and thus cannot use Reports without having a weird mix of original and translated words. In turn, having only some messages translated would be even more confusing. The result is that all messages related to input are now translated with Interface, which I think also makes sense. Discussed as a followup to !116804. ----- cc. @gtitaev
Damien Picard added the
Interest
Translations
Module
User Interface
labels 2024-01-17 16:07:40 +01:00
Damien Picard added 1 commit 2024-01-17 16:07:50 +01:00
e24fd75c51 I18n: use IFACE_ to translate status bar info & viewport statistics
Although the information displayed in the status bar is strictly
speaking reports, it makes sense to translate them using the Interface
setting instead of Reports, as the tool names and stats terms are
also translated in other UI places (toolbar, menus).

This change includes status bars statistics and keymaps, and viewport
statistics.

The change is quite extensive as it is all or nothing. Translating
keymaps using Interface means some status messages will include them
indirectly, and thus cannot use Reports without having a weird mix of
original and translated words. In turn, having only some messages
translated would be even more confusing.
The result is that all messages related to input are now translated with
Interface, which I think also makes sense.

Discussed as a followup to !116804.
Damien Picard changed title from I18n: use IFACE_ to translate status bar info & viewport statistics to WIP: I18n: use IFACE_ to translate status bar info & viewport statistics 2024-01-17 16:08:20 +01:00
Damien Picard added 1 commit 2024-01-17 16:11:47 +01:00
Damien Picard reviewed 2024-01-17 16:14:24 +01:00
@ -637,0 +633,4 @@
STRNCPY(msg,
data->sample_palette ?
IFACE_("Sample color for palette. Use Left Click to sample more colors") :
IFACE_("Sample color for brush. Use Left Click to sample for palette instead"));
Author
Member

Less straightforward change here, as I noticed the messages should be expanded instead of using clever formatting.

Less straightforward change here, as I noticed the messages should be expanded instead of using clever formatting.

Text edit itself looks good, though could be done in a separate PR...

But for me this is yet another good example of case that should not use IFACE_.

Text edit itself looks good, though could be done in a separate PR... But for me this is yet another good example of case that should _not_ use `IFACE_`.
Damien Picard changed title from WIP: I18n: use IFACE_ to translate status bar info & viewport statistics to I18n: use IFACE_ to translate status bar info & viewport statistics 2024-01-17 16:16:35 +01:00
Damien Picard requested review from Bastien Montagne 2024-01-17 16:16:56 +01:00
Bastien Montagne reviewed 2024-01-24 11:23:58 +01:00
Bastien Montagne left a comment
Owner

Am sort of torn with this PR... I think the big issue is that it's revealing how bad our 'status bar' reports are, being a horribly inconsistent mix of operator names, operator tooltips, stats report, keymaps reminders... and maybe even a few genuine status reports.

I would say, most of these changes are fine, but a few should be reverted to using RPT_ (or even TIP_), the complex full sentences ones. Some cases could also mix both in theory (when e.g. you get a tooltip, followed by a reminder of shortcuts), but think this would become way too confusing for everyone.

Am sort of torn with this PR... I think the big issue is that it's revealing how bad our 'status bar' reports are, being a horribly inconsistent mix of operator names, operator tooltips, stats report, keymaps reminders... and maybe even a few genuine status reports. I would say, most of these changes are fine, but a few should be reverted to using `RPT_` (or even `TIP_`), the complex full sentences ones. Some cases could also mix both in theory (when e.g. you get a tooltip, followed by a reminder of shortcuts), but think this would become way too confusing for everyone.
@ -1120,3 +1116,1 @@
"%s: panning, %s%s%s: orientation lock (%s), "
"%s: distance/angle measurements (%s), "
"%s: x-ray (%s)"),
IFACE_("%s: confirm, %s: cancel, %s: undo, "

This one fits as IFACE_, but imho should then be converted to title case ("%s: Confirm, %s: Cancel, ...).

This one fits as `IFACE_`, but imho should then be converted to title case (`"%s: Confirm, %s: Cancel, ...`).
@ -479,3 +479,2 @@
C,
RPT_("Select a ring to be cut, use mouse-wheel or page-up/down for number of cuts, "
"hold Alt for smooth"));
IFACE_("Select a ring to be cut, use mouse-wheel or page-up/down for number of cuts, "

Here the Select a ring to be cut is a tooltip really... And the rest of the message could be re-formated to something like "Number of Cuts: mouse-wheel or page-up/down, Smooth: Alt"

Some messages above even use things like WHEEL/+-...

Here the `Select a ring to be cut` is a tooltip really... And the rest of the message could be re-formated to something like `"Number of Cuts: mouse-wheel or page-up/down, Smooth: Alt"` Some messages above even use things like `WHEEL/+-`...
@ -766,3 +766,3 @@
ss->draw_faded_cursor = true;
const char *status_str = RPT_(
const char *status_str = IFACE_(

Another case of mixed tooltip and keymap info.

Another case of mixed tooltip and keymap info.
@ -147,3 +147,3 @@
static int add_marker_at_click_invoke(bContext *C, wmOperator *op, const wmEvent * /*event*/)
{
ED_workspace_status_text(C, RPT_("Use LMB click to define location where place the marker"));
ED_workspace_status_text(C, IFACE_("Use LMB click to define location where place the marker"));

Again, more like a tooltip than anything.

Again, more like a tooltip than anything.
Author
Member

I would say, most of these changes are fine, but a few should be reverted to using RPT_ (or even TIP_), the complex full sentences ones.

Here the Select a ring to be cut is a tooltip really […]

You’re right that it’s tooltip-like in that it gives usage info, but I really think TIP_ should be strictly reserved for actual tooltip pop-up boxes.

I think the confusion is that we’re trying to make this system work with two different categories of information: location in the UI (panels & menus, tooltip popups, information editor) and type of content (labels, instructions, reports). And these two categories sometimes overlap, typically for the status bar. It’s not perfect but when in doubt I’d favor focusing on UI location for consistency, as the alternative could be too surprising for users. (Sorry if this is all obvious, it helps me make the problem clearer to understand.)

That being said, I agree that the messages that look like tooltips should be made more in line with others that are more instructions-like. I’ll review them in their context to rephrase.

> I would say, most of these changes are fine, but a few should be reverted to using `RPT_` (or even `TIP_`), the complex full sentences ones. > Here the Select a ring to be cut is a tooltip really […] You’re right that it’s tooltip-like in that it gives usage info, but I really think `TIP_` should be strictly reserved for actual tooltip pop-up boxes. I think the confusion is that we’re trying to make this system work with two different categories of information: location in the UI (panels & menus, tooltip popups, information editor) and type of content (labels, instructions, reports). And these two categories sometimes overlap, typically for the status bar. It’s not perfect but when in doubt I’d favor focusing on UI location for consistency, as the alternative could be too surprising for users. (Sorry if this is all obvious, it helps me make the problem clearer to understand.) That being said, I agree that the messages that look like tooltips should be made more in line with others that are more instructions-like. I’ll review them in their context to rephrase.

@pioverfour sounds good! 👍

@pioverfour sounds good! 👍
Author
Member

I had another look, and many messages need rephrasing indeed. So much so that I think it needs a bit of design, so messages look more uniform everywhere.

My proposition would be to change everything to this format:

<Tool name or short description>. <Key1>: <Action 1>, <Key2/Key3>: <Action 2>

Some statuses use brackets to mean a togglable value is on, such as [E] - Disable overshoot and [E] - Enable overshoot. These should either read [E]: Overshoot / E: Overshoot, or E: Enable Overshoot / E: Disable Overshoot. I’d favor the first one because it makes UI less jumpy.

A few examples:

Before After
Fill: ESC/RMB cancel, LMB Fill, Shift Draw on Back, MMB Adjust Extend Fill. ESC/RMB: Cancel, LMB: Fill, Shift: Draw on Back, MMB: Adjust Extend
%s: confirm, %s: cancel, %s: undo, %s: start/define cut, %s: close cut, %s: new cut Knife Cut. %s: Confirm, %s: Cancel, %s: Undo, %s: Start/Define Cut, %s: Close Cut, %s: New Cut
Select a ring to be cut, use mouse-wheel or page-up/down for number of cuts, hold Alt for smooth Loop Cut. WHEEL/Page Up/Page Down: Number of Cuts, Alt: Smooth
Breakdown: [E] - Disable overshoot, [Shift] - Precision active | [Ctrl] - Increments active Breakdown. [E]: Overshoot, [Shift]: Precision Mode, [Ctrl]: 10% Increments
Breakdown: [E] - Enable overshoot, Shift - Hold for precision | Ctrl - Hold for 10% increments Breakdown. E: Overshoot, Shift: Precision Mode: Ctrl: 10% Increments
Annotation Create Poly: LMB click to place next stroke vertex | ESC/Enter to end (or click outside this area) Annotation Create Poly. LMB: place next stroke vertex, ESC/Enter: end (or click outside this area)

TL;DR This is probably outside the scope of this PR. Should I just change the macros to IFACE_ and open a new design task for the UI module? If this is then agreed upon it could go into the human interface guideline.

I had another look, and many messages need rephrasing indeed. So much so that I think it needs a bit of design, so messages look more uniform everywhere. My proposition would be to change everything to this format: `<Tool name or short description>. <Key1>: <Action 1>, <Key2/Key3>: <Action 2>` Some statuses use brackets to mean a togglable value is on, such as `[E] - Disable overshoot` and `[E] - Enable overshoot`. These should either read `[E]: Overshoot` / `E: Overshoot`, or `E: Enable Overshoot` / `E: Disable Overshoot`. I’d favor the first one because it makes UI less jumpy. A few examples: | Before | After | | -------- | -------- | | `Fill: ESC/RMB cancel, LMB Fill, Shift Draw on Back, MMB Adjust Extend` | `Fill. ESC/RMB: Cancel, LMB: Fill, Shift: Draw on Back, MMB: Adjust Extend` | | `%s: confirm, %s: cancel, %s: undo, %s: start/define cut, %s: close cut, %s: new cut` | `Knife Cut. %s: Confirm, %s: Cancel, %s: Undo, %s: Start/Define Cut, %s: Close Cut, %s: New Cut` | | `Select a ring to be cut, use mouse-wheel or page-up/down for number of cuts, hold Alt for smooth` | `Loop Cut. WHEEL/Page Up/Page Down: Number of Cuts, Alt: Smooth` | | `Breakdown: [E] - Disable overshoot, [Shift] - Precision active \| [Ctrl] - Increments active` | `Breakdown. [E]: Overshoot, [Shift]: Precision Mode, [Ctrl]: 10% Increments` | | `Breakdown: [E] - Enable overshoot, Shift - Hold for precision \| Ctrl - Hold for 10% increments` | `Breakdown. E: Overshoot, Shift: Precision Mode: Ctrl: 10% Increments` | | `Annotation Create Poly: LMB click to place next stroke vertex \| ESC/Enter to end (or click outside this area)` | `Annotation Create Poly. LMB: place next stroke vertex, ESC/Enter: end (or click outside this area)` | ----- TL;DR This is probably outside the scope of this PR. Should I just change the macros to `IFACE_` and open a new design task for the UI module? If this is then agreed upon it could go into the human interface guideline.

TL;DR This is probably outside the scope of this PR. Should I just change the macros to IFACE_ and open a new design task for the UI module? If this is then agreed upon it could go into the human interface guideline.

Yes, this seems to be the best solution for the time being.

> TL;DR This is probably outside the scope of this PR. Should I just change the macros to `IFACE_` and open a new design task for the UI module? If this is then agreed upon it could go into the human interface guideline. Yes, this seems to be the best solution for the time being.
Damien Picard added 1 commit 2024-01-26 12:01:32 +01:00

Think this PR needs some update from main?

Think this PR needs some update from main?
Damien Picard added 1 commit 2024-02-06 19:40:07 +01:00
buildbot/vexp-code-patch-lint Build done. Details
buildbot/vexp-code-patch-darwin-x86_64 Build done. Details
buildbot/vexp-code-patch-linux-x86_64 Build done. Details
buildbot/vexp-code-patch-darwin-arm64 Build done. Details
buildbot/vexp-code-patch-windows-amd64 Build done. Details
buildbot/vexp-code-patch-coordinator Build done. Details
84ce5262b9
Merge branch 'main' into dp_i18n_translate_status_bar_with_interface
Author
Member

Think this PR needs some update from main?

Indeed! Done.

> Think this PR needs some update from main? Indeed! Done.

@blender-bot build

@blender-bot build
Bastien Montagne approved these changes 2024-02-07 11:17:34 +01:00
Bastien Montagne merged commit 019eb5a35e into main 2024-02-07 11:18:02 +01:00
Bastien Montagne deleted branch dp_i18n_translate_status_bar_with_interface 2024-02-07 11:18:05 +01:00
Sign in to join this conversation.
No reviewers
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#117234
No description provided.