Bug 439358 - Inconsistent and conflicting translation for "Background" (layer) and "Background" (colour)
Summary: Inconsistent and conflicting translation for "Background" (layer) and "Backgr...
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Translation (other bugs)
Version First Reported In: git master (please specify the git hash!)
Platform: Other Other
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-07-01 07:43 UTC by Alvin Wong
Modified: 2022-09-20 09:31 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alvin Wong 2021-07-01 07:43:20 UTC
The string "Background" (null context) is used in several places:

These refer to the layer name:

- libs/image/kis_image.cc:686
- plugins/impex/psd/psd_loader.cpp:162
- plugins/python/comics_project_management_tools/comics_template_dialog.py:302
- libs/ui/forms/wdgnewimage.ui:484 ("Background:")

These refer to the colour:

- plugins/paintops/defaultpaintops/brush/kis_brushop_settings_widget.cpp:69
- plugins/filters/halftone/KisHalftoneConfigPageWidget.ui:175 ("Background:")
- plugins/generators/screentone/KisScreentoneConfigWidget.ui:394 ("Background:")

The following instances of "Background" also refer to the layer name, but with context:

- plugins/impex/psd/psd_layer_section.cpp:298 (context: "Automatically created layer name when saving into PSD")
- plugins/tools/svgtexttool/SvgTextTool.action:33 (context: "action")
- libs/image/KisTranslateLayerNamesVisitor.cpp:56 (context: "Layer name for translation of template")

In addition, there are instances of untranslated "Background" being used for layer names:

- libs/ui/KisDocument.cpp:2301
- libs/ui/KisDocument.cpp:2308 ("Background Fill", though this instance may also be interpreted as "background color" without issue)


My take on this:

- I tend to think that it is better to just write "background color" when referring to the colour, unless there really is a space limitation, in which case it should be clearly stated in the context string.
- We should try to consolidate all usages of layer names. It seems that reusing `libs/image/KisTranslateLayerNamesVisitor.cpp:56` is a good solution, even though it may not seem to be exactly for the purpose.
- "Background Fill" is the odd one out because there is no existing l10n string for it, which means we may need an exception to the string freeze to have it translated properly.
Comment 1 Alvin Wong 2021-07-13 11:24:21 UTC
Git commit fddf14a6f0175727490c29c1a50a82581e6f0018 by Alvin Wong.
Committed on 13/07/2021 at 10:13.
Pushed by rempt into branch 'master'.

Add i18n for background layer name

M  +2    -2    libs/ui/KisDocument.cpp

https://invent.kde.org/graphics/krita/commit/fddf14a6f0175727490c29c1a50a82581e6f0018
Comment 2 Alvin Wong 2021-07-13 12:13:07 UTC
Git commit 3e14f6b02422a933db684b995790445706f4706d by Alvin Wong.
Committed on 13/07/2021 at 12:11.
Pushed by alvinwong into branch 'krita/5.0'.

Add i18n for background layer name
(cherry picked from commit fddf14a6f0175727490c29c1a50a82581e6f0018)

M  +2    -2    libs/ui/KisDocument.cpp

https://invent.kde.org/graphics/krita/commit/3e14f6b02422a933db684b995790445706f4706d
Comment 3 Will Stephenson 2021-12-14 20:12:03 UTC
This is still valid in b00b0063. Alvin has fixed two instances of "Background without i18n() calls, but the context free i18n()s remain.
Comment 4 Halla Rempt 2022-09-20 09:31:52 UTC
Git commit 0d3a292737a877ac70d98a883c14793a3f5a88b9 by Halla Rempt.
Committed on 20/09/2022 at 09:08.
Pushed by rempt into branch 'master'.

Add context for background layer string

M  +1    -1    libs/image/kis_image.cc
M  +1    -1    libs/ui/KisDocument.cpp
M  +1    -1    plugins/impex/psd/psd_loader.cpp
M  +1    -1    plugins/paintops/defaultpaintops/brush/kis_brushop_settings_widget.cpp

https://invent.kde.org/graphics/krita/commit/0d3a292737a877ac70d98a883c14793a3f5a88b9