Fix #109114: i18n: FPS not displayed in the viewport in Hindi #109408

Merged
Bastien Montagne merged 1 commits from pioverfour/blender:dp_fix_fps_viewport into main 2023-07-06 09:38:19 +02:00
Member

The FPS in the viewport is displayed in a string of the form "fps:
%.2f". The string that stores it is of length 16, which is plenty
enough in English. But the translated message in Hindi uses
Devanagari, which takes up 4 bytes per char. Because of this, it is
too long and there is not enough room for the numbers to actually
appear.

To solve this, the containing string length was doubled to 32 chars.

The FPS in the viewport is displayed in a string of the form "fps: %.2f". The string that stores it is of length 16, which is plenty enough in English. But the translated message in Hindi uses Devanagari, which takes up 4 bytes per char. Because of this, it is too long and there is not enough room for the numbers to actually appear. To solve this, the containing string length was doubled to 32 chars.
Damien Picard added the
Module
User Interface
Interest
Translations
labels 2023-06-27 14:54:18 +02:00
Damien Picard requested review from Bastien Montagne 2023-06-27 14:54:32 +02:00
Damien Picard changed title from I18n: fix FPS not displayed in the viewport in Portuguese to Fix #109114: i18n: FPS not displayed in the viewport in Portuguese 2023-06-27 14:59:07 +02:00
Damien Picard force-pushed dp_fix_fps_viewport from efa8c91097 to 33fa7d5831 2023-06-27 14:59:36 +02:00 Compare

I.... am not sure I agree about this change. To me, this feels more like an issue in the Portuguese translation.

FPS is a extremely common short way to refer to that data (just like m for meters, etc). I see absolutely no reason to have a half explicit, half abbreviated five times longer string here. E.g. in French I would expect either using the international standard (fps), or try something like ips, very (very) maybe img/sec... but absolutely not images/sec. In Portuguese you do not even have to change the abbreviation.

One also have to keep in mind that the UI, as flexible as it may be, is defined and tweaked with some amount of (English) text as reference. If translations go too much away from the English verbosity, they will also run into all kind of 'does not fit' issues.

I.... am not sure I agree about this change. To me, this feels more like an issue in the Portuguese translation. `FPS` is a extremely common short way to refer to that data (just like `m` for meters, etc). I see absolutely no reason to have a half explicit, half abbreviated five times longer string here. E.g. in French I would expect either using the international standard (fps), or try something like `ips`, very (very) maybe `img/sec`... but absolutely not `images/sec`. In Portuguese you do not even have to change the abbreviation. One also have to keep in mind that the UI, as flexible as it may be, is defined and tweaked with some amount of (English) text as reference. If translations go too much away from the English verbosity, they will also run into all kind of 'does not fit' issues.
Author
Member

I understand the reasoning, but I’d argue that it may not apply to all languages. So far Vietnamese is concerned too, and since it uses a lot of accented characters, only 10 characters can be displayed out of 13, which doesn’t seem excessive to me.

image

I understand the reasoning, but I’d argue that it may not apply to all languages. So far Vietnamese is concerned too, and since it uses a lot of accented characters, only 10 characters can be displayed out of 13, which doesn’t seem excessive to me. ![image](/attachments/194524ef-424c-4401-a77a-24706a33e31e)

Same issue. Do not make translations 3 or 4 times longer than in original text. This is just giving your users bad UI experience.

Same issue. Do not make translations 3 or 4 times longer than in original text. This is just giving your users bad UI experience.
Author
Member

Ok then, should we remove the translation from the po files and leave a comment?

Ok then, should we remove the translation from the po files and leave a comment?

That's what I would do yes
or tag it as fuzzy rather, with comment

That's what I would do yes or tag it as fuzzy rather, with comment
Damien Picard closed this pull request 2023-07-03 15:40:23 +02:00
Damien Picard deleted branch dp_fix_fps_viewport 2023-07-03 15:40:47 +02:00
Author
Member

Sorry to insist, but another example is Hindi, which really doesn’t look excessively wide:

image
image

The word is only 5 chars wide, 2 more than "fps", but still gets cut off, presumably because of the character blocks that Devanagari are in in Unicode, which take up more space than ASCII:

image

I will still change the Portuguese and Vietnamese translations to #, fuzzy, but I do think the string should be lengthened, if only for Hindi.

Sorry to insist, but another example is Hindi, which really doesn’t look excessively wide: ![image](/attachments/f53c9ef0-246b-4153-ab1c-632a84c4ba3f) ![image](/attachments/ff53d49f-737b-4d6a-989c-ffb27f81a007) The word is only 5 chars wide, 2 more than "fps", but still gets cut off, presumably because of the character blocks that Devanagari are in in Unicode, which take up more space than ASCII: ![image](/attachments/e9f8c520-c402-4a67-94d2-c3db02f719fa) I will still change the Portuguese and Vietnamese translations to `#, fuzzy`, but I do think the string should be lengthened, if only for Hindi.

Eeeeeh OK, that one is a valid case... 5 chars in Devanagari use 20 bytes, so yeah... Indeed can be increased a bit then.

Eeeeeh OK, that one is a valid case... 5 chars in Devanagari use 20 bytes, so yeah... Indeed can be increased a bit then.
Bastien Montagne requested changes 2023-07-04 09:51:34 +02:00
@ -2563,3 +2563,3 @@
{
ScreenFrameRateInfo *fpsi = static_cast<ScreenFrameRateInfo *>(scene->fps_info);
char printable[16];
char printable[32];

Would add a comment explaining why it needs to be that big (otherwise someone may 'optimize' it again in the future):
/* 8 4-bytes chars (complex writing systems like Devanagari in UTF8 encoding) */

Would add a comment explaining why it needs to be that big (otherwise someone may 'optimize' it again in the future): `/* 8 4-bytes chars (complex writing systems like Devanagari in UTF8 encoding) */`
pioverfour marked this conversation as resolved
Damien Picard reopened this pull request 2023-07-05 22:58:49 +02:00
Damien Picard changed title from Fix #109114: i18n: FPS not displayed in the viewport in Portuguese to Fix #109114: i18n: FPS not displayed in the viewport in Hindi 2023-07-05 22:59:21 +02:00
Damien Picard requested review from Bastien Montagne 2023-07-05 23:00:06 +02:00
Bastien Montagne approved these changes 2023-07-06 09:37:41 +02:00
Bastien Montagne merged commit bbb18137ff into main 2023-07-06 09:38:19 +02:00
Bastien Montagne deleted branch dp_fix_fps_viewport 2023-07-06 09:38:21 +02: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#109408
No description provided.