Bug 1317385 - lang.sh and lang.csh should export FC_LANG
lang.sh and lang.csh should export FC_LANG
Status: ASSIGNED
Product: Fedora
Classification: Fedora
Component: initscripts (Show other bugs)
26
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Lukáš Nykrýn
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-03-14 03:45 EDT by Peng Wu
Modified: 2017-03-24 07:02 EDT (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-12-20 14:26:23 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
proposed patch (844 bytes, patch)
2016-03-28 03:50 EDT, Akira TAGOH
no flags Details | Diff

  None (edit)
Description Peng Wu 2016-03-14 03:45:08 EDT
Description of problem:

The content of .i18n file generated by fonts-tweak-tool is:
FC_LANG=zh-CN

maybe good to add export for .i18n file:
export FC_LANG=zh-CN

Version-Release number of selected component (if applicable):
fonts-tweak-tool-0.3.2-8.fc23.x86_64

How reproducible:


Steps to Reproduce:
1. Set "Chinese (P.R. of China)" in fonts-tweak-tool "Language Ordering"
2. Log in as English locale


Actual results:
gedit seems to use Traditional Chinese fonts for the character "骨"

Expected results:
gedit uses Simplified Chinese fonts for the character "骨"

Additional info:
Comment 1 Akira TAGOH 2016-03-28 02:54:15 EDT
.i18n file is usually loaded from both scripts of /etc/profile.d/lang.sh and /etc/profile.d/lang.csh and it has to be portable. adding "export key=val" thing into .i18n breaks things on csh. so adding similar thing of the following line in /etc/profile.d/lang.csh may be required for lang.sh as well:

    if ( -f "$HOME/.i18n" ) then
        eval `sed -ne 's|^[[:blank:]]*\([^#=]\{1,\}\)=\([^=]*\)|setenv \1 \2;|p' "$HOME/.i18n"`
        set sourced=1
    endif
Comment 2 Peng Wu 2016-03-28 03:24:41 EDT
Sorry, I am not familiar with shell scripts.

Is the following script portable?

FC_LANG=zh-CN
export FC_LANG
Comment 3 Akira TAGOH 2016-03-28 03:50 EDT
Created attachment 1140797 [details]
proposed patch
Comment 4 Akira TAGOH 2016-03-28 03:54:52 EDT
tested as the following:
% sh -c 'echo "FOO=bar" > ~/.i18n && . initscripts-9.65/lang.sh; sh -c printenv |grep FOO; rm ~/.i18n'
FOO=bar
% sh -c 'echo "FOO=bar" > ~/.i18n && . initscripts-9.65.orig/lang.sh; sh -c printenv |grep FOO; rm ~/.i18n'
%
Comment 5 Fedora End Of Life 2016-11-24 11:04:21 EST
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '23'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 23 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 6 Fedora End Of Life 2016-12-20 14:26:23 EST
Fedora 23 changed to end-of-life (EOL) status on 2016-12-20. Fedora 23 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.
Comment 7 Jens Petersen 2017-03-16 01:42:07 EDT
Should this not be re-opened? Or does it not affect F24+?
Comment 8 Jens Petersen 2017-03-16 01:50:41 EDT
Is it not better though to modify lang.sh and lang.csh to export FC_LANG?
I don't think font-tweak-tool should put "export" in ".i18n".
Comment 9 Akira TAGOH 2017-03-22 22:40:48 EDT
(In reply to Jens Petersen from comment #8)
> Is it not better though to modify lang.sh and lang.csh to export FC_LANG?

If we want to restrict the env vars to export, that would be an option yes.
Comment 10 Zbigniew Jędrzejewski-Szmek 2017-03-23 21:02:50 EDT
Is there any documentation for FC_LANG? I assume it is font-config-language, but I cannot find any pertinent docs.
Comment 11 Akira TAGOH 2017-03-24 00:12:39 EDT
Apparently not. but you're right. it is the env var to determine the default language in fontconfig.

Note You need to log in before you can comment on or make changes to this bug.