"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/System/Language/text_language.cpp" between
TeXmacs-1.99.8-src.tar.gz and TeXmacs-1.99.9-src.tar.gz

About: GNU TeXmacs is a what-you-see-is-what-you-get scientific text editor, which was both inspired by TeX and GNU Emacs.

text_language.cpp  (TeXmacs-1.99.8-src):text_language.cpp  (TeXmacs-1.99.9-src)
skipping to change at line 629 skipping to change at line 629
//#ifdef OS_MINGW //#ifdef OS_MINGW
// return win32::get_date(lan, fm); // return win32::get_date(lan, fm);
if (invalid_format (fm)) { if (invalid_format (fm)) {
if ((lan == "british") || (lan == "english") || (lan == "american")) if ((lan == "british") || (lan == "english") || (lan == "american"))
fm= "%B %d, %Y"; fm= "%B %d, %Y";
else if (lan == "german") else if (lan == "german")
fm= "%d. %B %Y"; fm= "%d. %B %Y";
else if (lan == "chinese" || lan == "japanese" || else if (lan == "chinese" || lan == "japanese" ||
lan == "korean" || lan == "taiwanese") lan == "korean" || lan == "taiwanese")
{ {
string y= simplify_date (var_eval_system ("date +\"%Y\"")); string y= simplify_date (var_eval_system ("date +\"%Y\""));
string m= simplify_date (var_eval_system ("date +\"%m\"")); string m= simplify_date (var_eval_system ("date +\"%m\""));
string d= simplify_date (var_eval_system ("date +\"%d\"")); string d= simplify_date (var_eval_system ("date +\"%d\""));
if (lan == "japanese") if (lan == "korean")
return y * "<#5e74>" * m * "<#6708>" * d * "<#65e5>"; return y * "<#b144> " * m * "<#c6d4> " * d * "<#c77c>";
if (lan == "korean") return y * "<#5e74>" * m * "<#6708>" * d * "<#65e5>";
return y * "<#b144> " * m * "<#c6d4> " * d * "<#c77c>";
return y * "," * m * "," * d;
} }
else fm= "%d %B %Y"; else fm= "%d %B %Y";
} }
lan= language_to_locale (lan); lan= language_to_locale (lan);
string lvar= "LC_TIME"; string lvar= "LC_TIME";
if (get_env (lvar) == "") lvar= "LC_ALL"; if (get_env (lvar) == "") lvar= "LC_ALL";
if (get_env (lvar) == "") lvar= "LANG"; if (get_env (lvar) == "") lvar= "LANG";
string old= get_env (lvar); string old= get_env (lvar);
set_env (lvar, lan); set_env (lvar, lan);
string date= simplify_date (var_eval_system ("date +\"" * fm * "\"")); string date= simplify_date (var_eval_system ("date +\"" * fm * "\""));
skipping to change at line 664 skipping to change at line 662
string string
pretty_time (int t) { pretty_time (int t) {
return var_eval_system ("date -r " * as_string (t)); return var_eval_system ("date -r " * as_string (t));
} }
#endif #endif
/****************************************************************************** /******************************************************************************
* Main interface * Main interface
******************************************************************************/ ******************************************************************************/
array<string>
get_supported_languages () {
array<string> r;
r << string ("american")
<< string ("british")
<< string ("bulgarian")
<< string ("chinese")
<< string ("croatian")
<< string ("czech")
<< string ("danish")
<< string ("dutch")
<< string ("english")
<< string ("esperanto")
<< string ("finnish")
<< string ("french")
<< string ("german")
<< string ("greek")
<< string ("hungarian")
<< string ("italian")
<< string ("japanese")
<< string ("korean")
<< string ("polish")
<< string ("portuguese")
<< string ("romanian")
<< string ("russian")
<< string ("slovene")
<< string ("spanish")
<< string ("swedish")
<< string ("taiwanese")
<< string ("ukrainian");
return r;
}
typedef const char* const_char_ptr; typedef const char* const_char_ptr;
static language static language
make_ucs_text_language (string s, string h) { make_ucs_text_language (string s, string h) {
return tm_new<ucs_text_language_rep> (s, h); return tm_new<ucs_text_language_rep> (s, h);
} }
static language static language
make_text_language (string s, string h) { make_text_language (string s, string h) {
return tm_new<text_language_rep> (s, h); return tm_new<text_language_rep> (s, h);
 End of changes. 2 change blocks. 
8 lines changed or deleted 39 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)