The resource format (.src) used for localization allows to group related strings into lists. These can be used, e.g., to represent values for a list box. However, string lists are sometimes (mis)used to group unrelated items; the advantage(?) being that only one identifier needs to be defined for the whole group. The items are then referenced by index, which is rather fragile when they are used in different parts of UI. A prime example of this is STR_PRINTOPTUI in sw/source/ui/config/optdlg.src, which contains writer-specific strings for the print dialog. There are ~30 strings in it, including labels, tab headings, items of various list boxes, etc. The string list is then used in sw/source/core/view/printdata.cxx as follows: ResStringArray aLocalizedStrings( SW_RES( STR_PRINTOPTUI ) ); ... OUString aAppGroupname( aLocalizedStrings.GetString( 0 ) ); ... String lists like this one should be replaced by separate strings. This requires to do the following: 1. Define an identifier for each string in the list in a convenient .hrc file (presumably the one where the string list's identifier is defined). Remove the definition of the string list identifier. 2. Split the StringArray definition in .src into separate String definitions. 3. Replace all uses of the string list in .cxx files by use of the separate strings. E.g., in the above example, aLocalizedStrings.GetString( 0 ) would be replaced by something like SW_RES( STR_PRINTOPTUI_APPGROUPNAME ).
I have solve here https://gerrit.libreoffice.org/20557
Migrating Whiteboard tags to Keywords: (easyHack, difficultyBeginner, skillCpp, topicCleanup)
Juergen Funk committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=7b28201fae997a6a63310653b9473985bd77911b tdf#91665 l10n: replace string lists - by separate strings It will be available in 5.2.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
JanI is default CC for Easy Hacks (Add Jan; remove LibreOffice Dev List from CC) [NinjaEdit]
Still working on this?
There are more of these, e.g., in basctl/source/basicide/basicrenderable.cxx or starmath/source/unomodel.cxx . To find such lists is a part of the task.
Putting it on ASSIGN, as there is an Assigned person
I have submitted two patches related to this bug report.[0][1] [0] https://gerrit.libreoffice.org/#/c/27641/ [1] https://gerrit.libreoffice.org/#/c/27665/
Muhammet Kara committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=a3e57b44b26db382b7fe3004aa0211e26c07e6db tdf#91665 l10n: Replace string list by separate strings in ScPrintUIOptions It will be available in 5.3.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Muhammet Kara committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=be53870adbae52613f35496296cac7b0dff66aa8 tdf#91665 l10n: Replace string list by separate strings in SmPrintUIOptions It will be available in 5.3.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Muhammet Kara committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=3e79c2f8c274c906d8ac259b4984b9637498e87b tdf#91665 l10n: replace string lists - by separate strings It will be available in 5.3.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Is there any other string array to be separated? (I couldn't find any.) If not, this bug seems solved.
(In reply to Muhammet Kara from comment #12) > Is there any other string array to be separated? (I couldn't find any.) If > not, this bug seems solved.