mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
L10N
- Added mechanism that displays the target language and tranlator's name for non-standard localizations.
This commit is contained in:
parent
3a4871e975
commit
e7428663d2
3 changed files with 24 additions and 1 deletions
|
@ -97,6 +97,11 @@ int CmdVersion::execute (std::string& output)
|
||||||
<< "-lua"
|
<< "-lua"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if PACKAGE_LANGUAGE != LANGUAGE_EN_US
|
||||||
|
<< " "
|
||||||
|
<< STRING_LOCALIZATION_DESC
|
||||||
|
#endif
|
||||||
|
|
||||||
<< "\n"
|
<< "\n"
|
||||||
<< STRING_CMD_VERSION_COPY
|
<< STRING_CMD_VERSION_COPY
|
||||||
<< "\n"
|
<< "\n"
|
||||||
|
@ -110,6 +115,12 @@ int CmdVersion::execute (std::string& output)
|
||||||
<< link.render ()
|
<< link.render ()
|
||||||
<< "\n";
|
<< "\n";
|
||||||
|
|
||||||
|
#if PACKAGE_LANGUAGE != LANGUAGE_EN_US
|
||||||
|
out << STRING_LOCALIZATION_AUTHOR
|
||||||
|
<< "\n"
|
||||||
|
<< "\n";
|
||||||
|
#endif
|
||||||
|
|
||||||
output = out.str ();
|
output = out.str ();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -93,6 +93,15 @@
|
||||||
#define INCLUDED_STRINGS
|
#define INCLUDED_STRINGS
|
||||||
#define L10N // Localization complete.
|
#define L10N // Localization complete.
|
||||||
|
|
||||||
|
// Note that for English, the following two lines are not displayed. For all
|
||||||
|
// other localizations, these lines will appear in the output of the 'version'
|
||||||
|
// and 'diagnostics' commands.
|
||||||
|
//
|
||||||
|
// DO NOT include a copyright in the translation.
|
||||||
|
//
|
||||||
|
#define STRING_LOCALIZATION_DESC "English localization"
|
||||||
|
#define STRING_LOCALIZATION_AUTHOR "Translated into English by A. Person."
|
||||||
|
|
||||||
// A3
|
// A3
|
||||||
#define STRING_A3_ALTERNATE_RC "Using alternate .taskrc file {1}"
|
#define STRING_A3_ALTERNATE_RC "Using alternate .taskrc file {1}"
|
||||||
#define STRING_A3_ALTERNATE_DATA "Using alternate date.location {1}"
|
#define STRING_A3_ALTERNATE_DATA "Using alternate date.location {1}"
|
||||||
|
|
|
@ -43,11 +43,14 @@
|
||||||
|
|
||||||
#include <cmake.h>
|
#include <cmake.h>
|
||||||
|
|
||||||
|
// Translators:
|
||||||
|
// Duplicate these three lines, changing "EN_US" and "en-US" to the new
|
||||||
|
// localization.
|
||||||
#if PACKAGE_LANGUAGE == LANGUAGE_EN_US
|
#if PACKAGE_LANGUAGE == LANGUAGE_EN_US
|
||||||
#include <en-US.h>
|
#include <en-US.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Other languages here.
|
// Add other languages here.
|
||||||
|
|
||||||
#define CCOLOR_BOLD 500
|
#define CCOLOR_BOLD 500
|
||||||
#define CCOLOR_UNDERLINE 501
|
#define CCOLOR_UNDERLINE 501
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue