Bug 107700 - Some font weights names not translatable in UI
Summary: Some font weights names not translatable in UI
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Localization (show other bugs)
Version:
(earliest affected)
5.3.3.1 rc
Hardware: All All
: medium trivial
Assignee: Gabor Kelemen
URL:
Whiteboard: target:5.5.0 target:5.4.0.1
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-08 09:19 UTC by Volga
Modified: 2017-06-10 06:13 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot (22.72 KB, image/png)
2017-05-09 04:22 UTC, Volga
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Volga 2017-05-08 09:19:45 UTC
Description:
In Character dialog, some font weights not being translated into Chinese, especially Semibold, Semibold Italic when I try to use Linux Libertine G, also affect Source Han Serif.

Steps to Reproduce:
-

Actual Results:  
-

Expected Results:
-


Reproducible: Always

User Profile Reset: Yes

Additional Info:
Version: 5.3.3.1 (x64)
Build ID: 46360c72c4823cefeaa85af537fba22bd568da7e
CPU Threads: 4; OS Version: Windows 6.19; UI Render: default; Layout Engine: new;
Locale: zh-CN (zh_CN); Calc: group


User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:53.0) Gecko/20100101 Firefox/53.0
Comment 1 Kevin Suo 2017-05-08 22:37:03 UTC
LibeeOffice UI 5.3 is 100% translated in pootle. For the font weight, I guess the names of weight may have been handled bt the system or the font itself. Should someone confirm? If it is true, then it is not our bug.
Comment 2 Volga 2017-05-09 04:22:37 UTC
Created attachment 133175 [details]
Screenshot

Here is my screenshot. In MS Windows Chinese Simplified version all font weights are translatable in C:\Windows\Fonts folder, for example, semibold -> 半粗体.
Comment 3 Kevin Suo 2017-05-09 04:45:37 UTC
I confirm in Fedora 25 x64, libreoffice 5.3.3.1.
Set to new.
Need someone familiar with the font staff to figure it out, where should the localization be done.
Comment 4 Gabor Kelemen 2017-06-05 20:14:36 UTC
I did a bit of research among the default fonts LO ships.
Found that there are quite a few style names coming from these that are not translated on the UI. The fonts and their untranslated style names are: 

DejaVuSerifCondensed; DejaVuSansCondensed
"Condensed"

DejaVuSerifCondensed
"Condensed Italic"

DejaVuSerifCondensed, DejaVuSansCondensed
"Condensed Bold"

DejaVuSerifCondensed
"Condensed Bold Italic"

DejaVuSans, SourceCodePro, SourceSansPro
"ExtraLight"

SourceSansPro, SourceCodePro, 
"ExtraLight Italic"

SourceSansPro, LinLibertine, SourceSansPro
"Semibold Italic"

SourceSansPro, LinLibertine, SourceSansPro
"Semibold"

SourceSansPro, SourceCodePro
"Light Italic"

SourceCodePro, ExtraLinBiolinum, ExtraLinLibertine
"Medium"

SourceCodePro
"Medium Italic"

DejaVuSansMono, DejaVuSansCondensed, DejaVuSans
"Oblique"

DejaVuSansMono, DejaVuSansCondensed, 
"Bold Oblique"

DejaVuSansCondensed-Oblique
"Condensed Oblique"

DejaVuSansCondensed-BoldOblique
"Condensed Bold Oblique"

DejaVuSansCondensed, DejaVuSans, DejaVuSerifCondensed, DejaVuSansMono, DejaVuSerif
"Book"

The command I used to query these was: 
$ for i in $(find ./workdir/UnpackedTarball/font_* -name "*.ttf"  ); do echo $i; fc-query $i | grep style: ; done

Now adding these strings is rather straightforward in http://opengrok.libreoffice.org/xref/core/svtools/source/control/ctrltool.cxx
Comment 5 Kevin Suo 2017-06-06 00:31:31 UTC
The are not tranlated because the strings are not included in pootle. 
Setting component to LibreOffice UI since this requires coding work and may not be handled by l10n team.
Comment 6 Commit Notification 2017-06-08 21:16:09 UTC
Gabor Kelemen committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=f5eae04d7af0ae165ee7045bf5fa101ee681aebf

tdf#107700 Translate some less common font style names

It will be available in 5.5.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.
Comment 7 Volga 2017-06-09 01:30:22 UTC
Is it possible to backport to 5.4?
Comment 8 Commit Notification 2017-06-09 19:57:03 UTC
Gabor Kelemen committed a patch related to this issue.
It has been pushed to "libreoffice-5-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=97859ca34eeeb4918f4fab6817619e2f9bf83e8b&h=libreoffice-5-4

tdf#107700 Translate some less common font style names

It will be available in 5.4.0.1.

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.