Translated text NOT display #68367

Closed
opened 2019-08-07 15:46:08 +02:00 by Hoang Duy Tran · 13 comments
Member

System Information
Operating system:
Linux, Kernel: 4.15.0-20-generic x86_64 bits: 64 compiler: gcc v: 7.3.0 Desktop: Cinnamon 4.0.8
Distro: Linux Mint 19.1 Tessa base: Ubuntu 18.04 bionic

Graphics card:
Device-1: Intel 4th Gen Core Processor Integrated Graphics vendor: Hewlett-Packard driver: i915 v: kernel
Device-2: NVIDIA GK208M [GeForce GT 740M] vendor: Hewlett-Packard driver: nouveau v: kernel bus ID: 01:00.0
Display: x11 server: X.Org 1.19.6 driver: modesetting,nouveau unloaded: fbdev,vesa
resolution: 1920x1080~60Hz, 1920x1080~60Hz
OpenGL: renderer: Mesa DRI Intel Haswell Mobile v: 4.5 Mesa 18.0.5 direct render: Yes

Blender Version
Blender 2.80 (sub 75)
build date: 2019-07-29
build time: 17:17:04
build commit date: 2019-07-29
build commit time: 14:47
build hash: f6cb5f5449
build platform: Linux
build type: Release

Short description of error
During the process of translating vi.po today, I stumbled upon this incident where the text resembled what is on display at this screen:

Screenshot from 2019-08-07 14-25-14.png

I was unable to capture the 'tooltips'

and the image of translated text is here:

Screenshot from 2019-08-07 14-22-27.png

and when turning to Vietnamese, I discovered the translated text is NOT visible, so I went through and examined the rest of tooltips and recorded the session:

vokoscreen-2019-08-07_13-58-16_cropped_00010001-0685.mp4

the next instance is this translated text:

Screenshot from 2019-08-07 14-38-36.png

The only thing I could spot is the 'full stop' punctuation at the end of the text on the screen vs the text in the PO file, but even after inserted the full stop (.) and recompiled the PO to MO file, I was unable to see the translated text. I felt completely helpless here, don't know what's going on.

Here is my blender.mo for the Vietnamese
blender.mo

Please drop it into the following directory:
2.80/datafiles/locale/vi/LC_MESSAGES

**System Information** Operating system: Linux, Kernel: 4.15.0-20-generic x86_64 bits: 64 compiler: gcc v: 7.3.0 Desktop: Cinnamon 4.0.8 Distro: Linux Mint 19.1 Tessa base: Ubuntu 18.04 bionic Graphics card: Device-1: Intel 4th Gen Core Processor Integrated Graphics vendor: Hewlett-Packard driver: i915 v: kernel Device-2: NVIDIA GK208M [GeForce GT 740M] vendor: Hewlett-Packard driver: nouveau v: kernel bus ID: 01:00.0 Display: x11 server: X.Org 1.19.6 driver: modesetting,nouveau unloaded: fbdev,vesa resolution: 1920x1080~60Hz, 1920x1080~60Hz OpenGL: renderer: Mesa DRI Intel Haswell Mobile v: 4.5 Mesa 18.0.5 direct render: Yes **Blender Version** Blender 2.80 (sub 75) build date: 2019-07-29 build time: 17:17:04 build commit date: 2019-07-29 build commit time: 14:47 build hash: f6cb5f54494e build platform: Linux build type: Release **Short description of error** During the process of translating vi.po today, I stumbled upon this incident where the text resembled what is on display at this screen: ![Screenshot from 2019-08-07 14-25-14.png](https://archive.blender.org/developer/F7652942/Screenshot_from_2019-08-07_14-25-14.png) I was unable to capture the 'tooltips' and the image of translated text is here: ![Screenshot from 2019-08-07 14-22-27.png](https://archive.blender.org/developer/F7652947/Screenshot_from_2019-08-07_14-22-27.png) and when turning to Vietnamese, I discovered the translated text is NOT visible, so I went through and examined the rest of tooltips and recorded the session: [vokoscreen-2019-08-07_13-58-16_cropped_00010001-0685.mp4](https://archive.blender.org/developer/F7652964/vokoscreen-2019-08-07_13-58-16_cropped_00010001-0685.mp4) the next instance is this translated text: ![Screenshot from 2019-08-07 14-38-36.png](https://archive.blender.org/developer/F7652962/Screenshot_from_2019-08-07_14-38-36.png) The only thing I could spot is the 'full stop' punctuation at the end of the text on the screen vs the text in the PO file, but even after inserted the full stop (.) and recompiled the PO to MO file, I was unable to see the translated text. I felt completely helpless here, don't know what's going on. Here is my blender.mo for the Vietnamese [blender.mo](https://archive.blender.org/developer/F7652972/blender.mo) Please drop it into the following directory: 2.80/datafiles/locale/vi/LC_MESSAGES
Author
Member

Added subscriber: @hoanguk

Added subscriber: @hoanguk

#72618 was marked as duplicate of this issue

#72618 was marked as duplicate of this issue
Member

Added subscribers: @mont29, @JacquesLucke

Added subscribers: @mont29, @JacquesLucke
Member

@mont29 any idea?

@mont29 any idea?
Bastien Montagne self-assigned this 2019-08-07 19:01:40 +02:00

Nearly all new UI code (new panels, tools stuff, etc.) was not doing any translations. At all. Even worse, it has not been designed thinking about it, which means we sometimes have to make very twisty stuff to get it partially working, and sometimes there is just no proper solution currently.

Have already fixed a lot of those issues recently, but looks like that one is using yet another code path, grrrrr.....

Nearly all new UI code (new panels, tools stuff, etc.) was not doing any translations. At all. Even worse, it has not been designed thinking about it, which means we sometimes have to make very twisty stuff to get it partially working, and sometimes there is just no proper solution currently. Have already fixed a lot of those issues recently, but looks like that one is using yet another code path, grrrrr.....
Bastien Montagne removed their assignment 2019-08-08 14:17:51 +02:00
Campbell Barton was assigned by Bastien Montagne 2019-08-08 14:17:51 +02:00

Added subscriber: @ideasman42

Added subscriber: @ideasman42

OK, so i'm tired of hacking things around here, think it's time to do what should have been done from the start: add proper support for i18n to the tools system.

IMHO, the way to go here would be to add two callbacks to ToolDef, e.g ui_label() and ui_description(), that would roughly do what description_from_id() is currently doing... ToolDef being a named tuple though, it can only have 'static' functions I think, like the from_fn and from_dict ones?

@ideasman42 assigning to you to get your input here, am fine implementing whatever we come up with, but you are the original designer of the whole system, so better you chime in first.

OK, so i'm tired of hacking things around here, think it's time to do what should have been done from the start: add proper support for i18n to the tools system. IMHO, the way to go here would be to add two callbacks to `ToolDef`, e.g `ui_label()` and `ui_description()`, that would roughly do what `description_from_id()` is currently doing... `ToolDef` being a named tuple though, it can only have 'static' functions I think, like the `from_fn` and `from_dict` ones? @ideasman42 assigning to you to get your input here, am fine implementing whatever we come up with, but you are the original designer of the whole system, so better you chime in first.
Author
Member

My little observation (probably redundant) is that translated text needed to go to 'pgettext_tip' (renamed as 'tip_' on import)

Screenshot from 2019-08-09 00-06-43.png

as found in this example, which is working (at the moment):

Screenshot from 2019-08-08 19-18-48.png

So properties of 'wmOperatorType' instance (ie. ot->description) must be output to GUI using 'pgettext_tip':

Screenshot from 2019-08-08 19-30-08.png

My little observation (probably redundant) is that translated text needed to go to 'pgettext_tip' (renamed as 'tip_' on import) ![Screenshot from 2019-08-09 00-06-43.png](https://archive.blender.org/developer/F7655300/Screenshot_from_2019-08-09_00-06-43.png) as found in this example, which is working (at the moment): ![Screenshot from 2019-08-08 19-18-48.png](https://archive.blender.org/developer/F7655302/Screenshot_from_2019-08-08_19-18-48.png) So properties of 'wmOperatorType' instance (ie. ot->description) must be output to GUI using 'pgettext_tip': ![Screenshot from 2019-08-08 19-30-08.png](https://archive.blender.org/developer/F7655305/Screenshot_from_2019-08-08_19-30-08.png)

That’s more a UI code design issue than a #Translations one really…

That’s more a UI code design issue than a #Translations one really…
Campbell Barton was unassigned by Dalai Felinto 2019-12-23 16:33:23 +01:00

Added subscriber: @iss

Added subscriber: @iss
Member

Added subscriber: @pioverfour

Added subscriber: @pioverfour
Member

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Damien Picard self-assigned this 2022-09-26 19:50:43 +02:00
Member

This was fixed between 2.80 and 2.81.

This was fixed between 2.80 and 2.81.
Damien Picard removed their assignment 2022-09-26 19:51:09 +02:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser Project (Legacy)
Interest
Asset System
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
6 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#68367
No description provided.