Bug 19394 - mcs does not honor LANG setting for valid localizations
Summary: mcs does not honor LANG setting for valid localizations
Status: NEW
Alias: None
Product: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: unspecified
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Marek Safar
URL:
Depends on:
Blocks:
 
Reported: 2014-04-30 01:02 UTC by Michael Herring
Modified: 2014-05-07 01:01 UTC (History)
2 users (show)

See Also:
Tags:
Is this bug a regression?: ---
Last known good build:


Attachments

Description Michael Herring 2014-04-30 01:02:02 UTC
Looking in the Mono source on Github, it looks like there is a Japanese localization for mcs. In particular, ja.po specifies a translation for error CS2009, which can be generated when mcs is run with no input files specified. (see https://github.com/mono/mono/blob/master/po/mcs/ja.po and search for "No files to compile were specified")

When I install Mono 3.4.0 and run "mcs" on the command line, the error is output in English. 

My computer is running with a Japanese locale. In Terminal, my LANG variable is "ja_JP.UTF-8". If I set LANG variable to "ja_JP", or "ja", or "JP", etc nothing seems to affect mcs's output. 

Browsing through driver.cs, context.cs, report.cs and settings.cs in the mcs source tree, I can't really find any place where mcs looks at the system local, uses Gettext or Catalog.GetString, etc. It looks like mcs has translations, but doesn't actually use them?

 - Steps to reproduce:
1. Run bash in the Japanese locale, LANG=ja_JP.UTF-8
2. run "mcs" on the command line with no arguments.

 - Expected results:
"error CS2008: コンパイルするファイルが指定されていません"

 - Actual results:
"error CS2008: No files to compile were specified"
Comment 1 Michael Herring 2014-05-07 01:01:27 UTC
Just bumping this up since its status isn't changing. I have reproduced the bug on Mono for Windows, as well. Both LANG and LANGUAGE were set to ja, and ja_JP, but the CS2008 error output is still in English.

Windows 7, Japanese edition, on a 2013 MacBook Pro.

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