Bug 164954 - Translate German variable and constant names
Summary: Translate German variable and constant names
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:25.8.0
Keywords: difficultyBeginner, easyHack, skillCpp, topicCleanup
Depends on:
Blocks:
 
Reported: 2025-01-30 10:15 UTC by Hossein
Modified: 2025-05-14 09:26 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hossein 2025-01-30 10:15:18 UTC
Background:
In the past, LibreOffice source code had many comments written in German, and to help developers around the world who do not know German to understand the code, those comments were translated to English, in tdf#39468:

Bug 39468 - translate German comments, removing redundant ones
https://bugs.documentfoundation.org/show_bug.cgi?id=39468

Description:
The task here is to find and translate variables and constant with German names to English. This renaming is a kind of refactoring, and should be done in a way that does not affect the code behavior. Therefore, you should also change any occurrence of the variable in the code. For this purpose, you may use IDE capabilities or tools like 'grep'.

These IDs are also used for bookmark references in the help contents. You have to also rename them inside help contents to make sure that the help bookmarks remain valid.

Examples:
This is an example change, which can show you what to do:

sc: translate German name in variable
https://gerrit.libreoffice.org/c/core/+/180902

If you look into sc/inc/helpids.h, you may find many other instances that need translation. The task here is not limited to this file, but this specific file is a good starting point.

It is important to know that the above IDs are also referred in help contents, as described here:

Help File XML format Basics > Defining Index, Contents, and Context Sensitivity > "hid" Branch
https://wiki.documentfoundation.org/Documentation/Understanding,_Authoring_and_Editing_Openoffice.org_Help/2#%22hid%22_Branch

Therefore, you should also do grepping inside help contents. For example:

$ git grep SC_HID_FUNC_WAHL
sc/inc/helpids.h:inline constexpr OUString HID_FUNC_WAHL = u"SC_HID_FUNC_WAHL"_ustr;

$ cd helpcontent2/
$ git grep SC_HID_FUNC_WAHL
source/text/scalc/01/04060109.xhp:<bookmark branch="hid/SC_HID_FUNC_WAHL" id="bm_id3153947" localize="false"/>

You should also change the ID(s) in helpcontent2/ folder accordingly.

Notes:
Please do not change unrelated files, like language files related to German support. The focus here is the C++ code.
Comment 1 Buovjaga 2025-01-30 11:02:47 UTC
(In reply to Hossein from comment #0)
> $ cd helpcontent2/
> $ git grep SC_HID_FUNC_WAHL
> source/text/scalc/01/04060109.xhp:<bookmark branch="hid/SC_HID_FUNC_WAHL"
> id="bm_id3153947" localize="false"/>

To achieve this, you have to add to your autogen.input

--with-help=html

See https://wiki.documentfoundation.org/Documentation/Help#How_to_send_it_back_for_approval_(via_gerrit) for how to handle the submodule and submit patches (it's different from core).

The help patch should be merged at the same time as the core patch.
Comment 2 Commit Notification 2025-04-29 09:30:44 UTC
Simon Chenery committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/d2d50dba5b41ebd1d4c848c48c9ec457d9efcd93

tdf#164954 replace German variable nBreite with English nWidth in op.cxx

It will be available in 25.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 3 Commit Notification 2025-04-30 07:37:15 UTC
Simon Chenery committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/0661337767b0a07990ea72898b1bd9837306c467

tdf#164954 rename German abbreviation "Koeff" to English "Coeff" in vars, funcs

It will be available in 25.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 4 Commit Notification 2025-05-06 22:38:23 UTC
Simon Chenery committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/8a32f77178e3adc2e661305838064ec9be5f25f6

tdf#164954 fix mis-spelled "punktuation" in variable name in TextPortion.hxx

It will be available in 25.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 5 Commit Notification 2025-05-14 09:26:18 UTC
Simon Chenery committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/7cef9ea98537f990aa9d0b8e9a7f3ed5f1d5d228

tdf#164954 translate OSL_ENSURE warning message from German to English

It will be available in 25.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.