Bug 1317385 - lang.sh and lang.csh should export FC_LANG
Summary: lang.sh and lang.csh should export FC_LANG
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: setup
Version: 28
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Ondrej Vasik
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-14 07:45 UTC by Peng Wu
Modified: 2019-05-07 07:55 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-05-07 07:55:36 UTC


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

Description Peng Wu 2016-03-14 07:45:08 UTC
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 06:54:15 UTC
.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 07:24:41 UTC
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 07:50:00 UTC
Created attachment 1140797 [details]
proposed patch

Comment 4 Akira TAGOH 2016-03-28 07:54:52 UTC
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 16:04:21 UTC
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 19:26:23 UTC
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 05:42:07 UTC
Should this not be re-opened? Or does it not affect F24+?

Comment 8 Jens Petersen 2017-03-16 05:50:41 UTC
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-23 02:40:48 UTC
(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-24 01:02:50 UTC
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 04:12:39 UTC
Apparently not. but you're right. it is the env var to determine the default language in fontconfig.

Comment 14 Fedora End Of Life 2018-02-20 15:23:35 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 28 development cycle.
Changing version to '28'.

Comment 16 Ben Cotton 2019-05-02 20:25:05 UTC
This message is a reminder that Fedora 28 is nearing its end of life.
On 2019-May-28 Fedora will stop maintaining and issuing updates for
Fedora 28. 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 '28'.

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 28 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 17 Akira TAGOH 2019-05-07 07:55:36 UTC
This seems fixed in f30 (at least).

$ sh -c 'echo "FC_LANG=ja" > ~/.i18n && . /etc/profile.d/lang.sh; sh -c printenv |grep FC_LANG; rm ~/.i18n'
FC_LANG=ja
$ tcsh -c 'echo "FC_LANG=ja" > ~/.i18n && source /etc/profile.d/lang.csh ; tcsh -c printenv | grep FC_LANG; rm ~/.i18n'
FC_LANG=ja
$ rpm -qf /etc/profile.d/lang.sh 
setup-2.13.3-1.fc30.noarch
$ rpm -qf /etc/profile.d/lang.csh 
setup-2.13.3-1.fc30.noarch


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