Some translation strings need a specific context (msgctx) (missing sphinx feature) #102820

Open
opened 2022-11-27 23:10:10 +01:00 by Hoang Duy Tran · 10 comments
Member

System Information
Operating system: macOS-10.15.7-x86_64-i386-64bit 64 Bits

Blender Version
Broken: version: 3.5.0 Alpha, branch: master, commit date: 2022-11-20 21:42, hash: blender/blender@e83f46ea76

Short description of error
The word 'Wrap' has been using in 3 different contexts which are quite far apart:

  • : ../../compositing/types/converter/math.rst
  • : ../../compositing/types/filter/directional_blur.rst:28
  • : ../../editors/text_editor.rst:252
  • : ../../render/shader_nodes/converter/vector_math.rst
    msgid "Wrap"
    msgstr ""

in the converter/math, and vector_math it means limiting the range of output within the Min/Max as defined in this

https://developer.blender.org/rBM9716

in the directional_blur, it means 'repeat' the part of image to fill the transparency

in the text_editor, it means changing the direction of search (top -> bottom, bottom -> top). Considering we are lucky to have two words 'Word Wrap' to go together to form a new term.

I think we should bring back 'msgctx' in to the manual. I believe this will benefit other languages as well, not just Vietnamese, and will also bring forth other issues similar.

**System Information** Operating system: macOS-10.15.7-x86_64-i386-64bit 64 Bits **Blender Version** Broken: version: 3.5.0 Alpha, branch: master, commit date: 2022-11-20 21:42, hash: `blender/blender@e83f46ea76` **Short description of error** The word 'Wrap' has been using in 3 different contexts which are quite far apart: - : ../../compositing/types/converter/math.rst - : ../../compositing/types/filter/directional_blur.rst:28 - : ../../editors/text_editor.rst:252 - : ../../render/shader_nodes/converter/vector_math.rst msgid "Wrap" msgstr "" in the converter/math, and vector_math it means limiting the range of output within the Min/Max as defined in this https://developer.blender.org/rBM9716 in the directional_blur, it means 'repeat' the part of image to fill the transparency in the text_editor, it means changing the direction of search (top -> bottom, bottom -> top). Considering we are lucky to have two words 'Word Wrap' to go together to form a new term. I think we should bring back 'msgctx' in to the manual. I believe this will benefit other languages as well, not just Vietnamese, and will also bring forth other issues similar.
Author
Member

Added subscriber: @hoanguk

Added subscriber: @hoanguk
Member

Added subscriber: @PratikPB2123

Added subscriber: @PratikPB2123
Member

Added subscriber: @Blendify

Added subscriber: @Blendify
Member

Unfortunately, sphinx does not have a simple way to fix this.

See https://github.com/sphinx-doc/sphinx/issues/8251

We cant go back to split po files per rst file either because translation websites such as weblate use one translation file per language.

The best way to get around this is use different English words in the UI that better represent the function they perform.

Unfortunately, sphinx does not have a simple way to fix this. See https://github.com/sphinx-doc/sphinx/issues/8251 We cant go back to split po files per rst file either because translation websites such as weblate use one translation file per language. The best way to get around this is use different English words in the UI that better represent the function they perform.
Author
Member

This would be the best approach, however, beware of similar issues that would be raised and the effects on the UI. I hate to have go back to per RST file bases due to duplications.

This is a good read:

https://developer.blender.org/T43295

This would be the best approach, however, beware of similar issues that would be raised and the effects on the UI. I hate to have go back to per RST file bases due to duplications. This is a good read: https://developer.blender.org/T43295
Author
Member

Just wanted to add an important multi-meaning word:

- : ../../addons/import_export/images_as_planes.rst:142
- : ../../files/import_export/grease_pencil_pdf.rst:38
- : ../../files/import_export/grease_pencil_svg.rst:42
- : ../../grease_pencil/materials/properties.rst:125
- : ../../grease_pencil/modes/draw/tool_settings/color.rst
- : ../../grease_pencil/modes/draw/tools/tint.rst
- : ../../grease_pencil/modes/vertex_paint/tool_settings/brush.rst
- : ../../grease_pencil/modifiers/generate/envelope.rst
- : ../../grease_pencil/modifiers/modify/texture_mapping.rst:56
- : ../../modeling/meshes/editing/face/fill.rst:6
- : ../../modeling/meshes/editing/mesh/bisect.rst:22
- : ../../modeling/meshes/uv/workflows/udims.rst:105
- : ../../modeling/modifiers/generate/solidify.rst:104
- : ../../movie_clip/masking/sidebar.rst:100
- : ../../render/cycles/render_settings/simplify.rst:78
- : ../../sculpt_paint/sculpting/tools/color_filter.rst
- : ../../sculpt_paint/sculpting/tools/fill.rst:4
- : ../../sculpt_paint/texture_paint/tools.rst:77
msgid "Fill"
msgstr ""
  • In sculpting, it means 'Filling Up', bringing vertices upward.
  • in painting, it means 'Covering an area' with color.
  • in solidify, bisect, it means 'filling up' gaps. Can be the same as in masking.

etc... just to name a few cases where translations are different.

I don't know how you could find a single word to replace them all apart from using multiple words describing the actual action of filling in each case individually. This can be a challenging task.

Just wanted to add an important multi-meaning word: ``` - : ../../addons/import_export/images_as_planes.rst:142 - : ../../files/import_export/grease_pencil_pdf.rst:38 - : ../../files/import_export/grease_pencil_svg.rst:42 - : ../../grease_pencil/materials/properties.rst:125 - : ../../grease_pencil/modes/draw/tool_settings/color.rst - : ../../grease_pencil/modes/draw/tools/tint.rst - : ../../grease_pencil/modes/vertex_paint/tool_settings/brush.rst - : ../../grease_pencil/modifiers/generate/envelope.rst - : ../../grease_pencil/modifiers/modify/texture_mapping.rst:56 - : ../../modeling/meshes/editing/face/fill.rst:6 - : ../../modeling/meshes/editing/mesh/bisect.rst:22 - : ../../modeling/meshes/uv/workflows/udims.rst:105 - : ../../modeling/modifiers/generate/solidify.rst:104 - : ../../movie_clip/masking/sidebar.rst:100 - : ../../render/cycles/render_settings/simplify.rst:78 - : ../../sculpt_paint/sculpting/tools/color_filter.rst - : ../../sculpt_paint/sculpting/tools/fill.rst:4 - : ../../sculpt_paint/texture_paint/tools.rst:77 msgid "Fill" msgstr "" ``` - In sculpting, it means 'Filling Up', bringing vertices upward. - in painting, it means 'Covering an area' with color. - in solidify, bisect, it means 'filling up' gaps. Can be the same as in masking. etc... just to name a few cases where translations are different. I don't know how you could find a single word to replace them all apart from using multiple words describing the actual action of filling in each case individually. This can be a challenging task.
Aaron Carlisle changed title from Using of the 'Wrap' word needs specific context (msgctx) to Some translation strings need a specific context (msgctx) (missing sphinx feature) 2022-12-08 00:31:30 +01:00
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Member

The best solution here would be to add a feature in sphinx to declare a specific translation context per file or section of text.

This is not something I have time to look into immediately but something that would be nice to add in the future.

The best solution here would be to add a feature in sphinx to declare a specific translation context per file or section of text. This is not something I have time to look into immediately but something that would be nice to add in the future.
Author
Member

In #102820#1456414, @Blendify wrote:
The best solution here would be to add a feature in sphinx to declare a specific translation context per file or section of text.

This is not something I have time to look into immediately but something that would be nice to add in the future.

This requires implementer thinks and search for unique names for GUI fields (unless the same context is reused). I honestly don't understand why CODING_NAME (using underscore to separate context) is used quite regularly and yet when it comes to GUI field name, people just cannot be bother. Is this because grammatically C/C++ or languages in general requires that variable names to be unique, and the code would not either pass compilation or would produce wrong result if not careful? I have been there myself and I understood the mentality of it. Just that now I am a translator I realise why unique names makes life of translators much easier (survivable). One earliest incident I discover was the word 'Volume' (Sound vs Mass). The job make it so difficult for programmers because most of them are English and using English. Plus in terms of languages, each language have a different grammar and different ways of representing a concept (ie. some has gender separation (male/female)), and some has distinction for nouns and verbs (as in Vietnamese) but not as blur as English (ie. 'smooth' can be verb, adjective, adverb, where for verbs we Vietnamese have to add 'làm' in front of it to indication action in verbs). This is why, initially, I thought if this job could be allocated translators and let them define context for the translations then the job would be much simpler. I just thought maybe an extra file prepared by translators for contexts of words is needed in the step of bringing translations to GUI screen render.

> In #102820#1456414, @Blendify wrote: > The best solution here would be to add a feature in sphinx to declare a specific translation context per file or section of text. > > This is not something I have time to look into immediately but something that would be nice to add in the future. This requires implementer thinks and search for unique names for GUI fields (unless the same context is reused). I honestly don't understand why CODING_NAME (using underscore to separate context) is used quite regularly and yet when it comes to GUI field name, people just cannot be bother. Is this because grammatically C/C++ or languages in general requires that variable names to be unique, and the code would not either pass compilation or would produce wrong result if not careful? I have been there myself and I understood the mentality of it. Just that now I am a translator I realise why unique names makes life of translators much easier (survivable). One earliest incident I discover was the word 'Volume' (Sound vs Mass). The job make it so difficult for programmers because most of them are English and using English. Plus in terms of languages, each language have a different grammar and different ways of representing a concept (ie. some has gender separation (male/female)), and some has distinction for nouns and verbs (as in Vietnamese) but not as blur as English (ie. 'smooth' can be verb, adjective, adverb, where for verbs we Vietnamese have to add 'làm' in front of it to indication action in verbs). This is why, initially, I thought if this job could be allocated translators and let them define context for the translations then the job would be much simpler. I just thought maybe an extra file prepared by translators for contexts of words is needed in the step of bringing translations to GUI screen render.
Author
Member

Adding another term:

  • : ../../editors/preferences/keymap.rst:52
  • : ../../render/materials/legacy_textures/types/image_movie.rst:229
  • : ../../sculpt_paint/sculpting/tools/cloth_filter.rst:39
  • : ../../sculpt_paint/sculpting/tools/color_filter.rst:29

: ../../sculpt_paint/sculpting/tools/mesh_filter.rst:75

msgid "Filter Type"

  • in keymap this means selective by components, perhaps it's better to use 'Filtering By Component'.
  • in other contexts it refers to a physical method or operation to apply. Perhaps it's better to use 'Filtering Method' instead.
Adding another term: - : ../../editors/preferences/keymap.rst:52 - : ../../render/materials/legacy_textures/types/image_movie.rst:229 - : ../../sculpt_paint/sculpting/tools/cloth_filter.rst:39 - : ../../sculpt_paint/sculpting/tools/color_filter.rst:29 # : ../../sculpt_paint/sculpting/tools/mesh_filter.rst:75 msgid "Filter Type" - in keymap this means selective by components, perhaps it's better to use 'Filtering By Component'. - in other contexts it refers to a physical method or operation to apply. Perhaps it's better to use 'Filtering Method' instead.
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 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-manual#102820
No description provided.