Bug 108301 - Style commands in the UI are language-dependent
Summary: Style commands in the UI are language-dependent
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Writer-Toolbar-Formatting-Styles Style-Formatting-Writer-Toolbar
  Show dependency treegraph
 
Reported: 2017-06-02 09:13 UTC by Thomas Lendo
Modified: 2018-04-15 19:16 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
On top: Formatting (Styles) toolbar, pre-installed in LO 5.5 / bottom: custom toolbar with the same styles (19.23 KB, image/png)
2017-06-04 20:40 UTC, Thomas Lendo
Details
Custom toolbar, cloning the Formatting (Styles) toolbar (2.26 KB, text/xml)
2017-06-04 20:42 UTC, Thomas Lendo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Lendo 2017-06-02 09:13:13 UTC
If you add a style command to e.g. a toolbar, the full xlink name will be added to the appropriate toolbar xml file. For character styles it's xlink:href=".uno:StyleApply?Style:string=NAMEOFSTYLE&FamilyName:string=CharacterStyles". Other styles are structured identically.

The string NAMEOFSTYLE is replaced by the name of the style.

Problem:
It's the name which is also visible in the Styles & Formatting sidebar deck and not an abstract name.

Consequence:
If the style has a German name when adding to a toolbar, it's not usable in non-German installations.

The other way round (English name in German UI) is only not working with character style "Default Style" (German: "Standard"), as far as I figured out.


In the following example, the English string can't be used in an German UI. The German string can't be used in an English UI.

German:

<toolbar:toolbaritem toolbar:text="Standard" xlink:href=".uno:StyleApply?Style:string=Standard&FamilyName:string=CharacterStyles"/>

English:

<toolbar:toolbaritem toolbar:text="Default Style"  xlink:href=".uno:StyleApply?Style:string=Default Style&FamilyName:string=CharacterStyles"/>
Comment 1 Yousuf Philips (jay) (retired) 2017-06-02 11:25:26 UTC
The style name's arent language dependent unless they are set so in the XML file.
Comment 2 Thomas Lendo 2017-06-04 20:40:51 UTC
Created attachment 133850 [details]
On top: Formatting (Styles) toolbar, pre-installed in LO 5.5 / bottom: custom toolbar with the same styles

The attached screenshot shows 2 toolbars:

1. Toolbar on top: pre-installed Formatting (Styles) toolbar of LO 5.5.0.0 alpha0 which shows only English style names except "Betont" (emphasis character style).

2. Toolbar on the bottom: custom toolbar with the same styles, made by me with LO 5.5.0.0 alpha0 which shows the same styles, all paragraph and character styles are German but not the list styles except Numbered List 5 (German: Nummerierung 5). I renamed Heading 1-3 manually to Ü1, Ü2, Ü3. But in the XML file you can see that character style "Default" and list style "Numbered List 5" also have names (toolbar:text="Standard" + toolbar:text="Nummerierung 5") which were not added by me but from LO. I don't know why and when do LO add a name for a style.
Comment 3 Thomas Lendo 2017-06-04 20:42:33 UTC
Created attachment 133851 [details]
Custom toolbar, cloning the Formatting (Styles) toolbar

German UI.

Version: 5.5.0.0.alpha0+
Build-ID: b08217989558addbcaded122a4e7211ae24bbcff
CPU-Threads: 4; Betriebssystem:Linux 4.8; UI-Render: Standard; VCL: gtk2; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2017-05-31_06:36:03
Gebietsschema: de-DE (de_DE.UTF-8); Calc: group
Comment 4 Thomas Lendo 2017-06-04 20:58:56 UTC
Forget point 1. in comment 2. The style entries of the Formatting (Styles) toolbar have short names except "Emphasis". Therefore it's clear that they are shown English.

But that didn't explain why some manually added styles get a name automatically. Can you reproduce that?
Comment 5 Yousuf Philips (jay) (retired) 2017-06-06 13:19:57 UTC
(In reply to Thomas Lendo from comment #4)
> But that didn't explain why some manually added styles get a name
> automatically. Can you reproduce that?

They get the same name found in the add command dialog for me. If you think there is a bug for manually added styles, please file a new bug report with steps so i can try and repo it.