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)

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

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report for Bug 19394 on GitHub or Developer Community if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: GitHub Markdown or Developer Community HTML
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
NEW

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.