1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281
|
unit pocheckerconsts;
{$mode objfpc}{$H+}
interface
Uses Controls;
resourcestring
//Main form
rsPoChecker = 'Check PO Files ...';
sSelectAllTests = 'Select &All';
sUnselectAllTests = '&Unselect All';
sGUIPoFileCheckingTool = 'GUI Po-file checking tool';
sSelectTestTypes = 'Select test types';
sScanDir = 'Scan a folder';
sRunSelectedTests = '&Run Selected Tests';
sClearListBox = 'Clear';
sUnselectListBox = 'Unselect all files';
sSelectAllListBox = 'Select all files';
sAllLanguages = 'All Languages';
sFilesNotFoundAndRemoved = 'The following non-existent files were removed from the list:' + LineEnding + '%s';
sNoFilesLeftToCheck = 'There are no files left to check.';
sErrorOnCreate = 'Error creating an instance of TPoFamily:' + LineEnding + '%s';
sErrorOnCleanup = 'An unrecoverable error occurred' + LineEnding + '%s' + LineEnding + 'Please close the program';
sLastSearchPath = 'Last search path:';
sLanguage = 'Language:';
sTotalErrors = 'Total errors: %d';
sTotalErrorsNonFuzzy = 'Total errors: %d (formatting errors in non-fuzzy strings: %d)';
sTotalWarnings = 'Total warnings: %d';
sTotalUntranslatedStrings = 'Total untranslated strings: %s';
sTotalFuzzyStrings = 'Total fuzzy strings: %s';
sTotalTranslatedStrings = 'Total translated strings: %s (%.1f%%)';
sCurrentTest = 'Test: %s on %s';
sNoTestSelected = 'There are no tests selected.';
sScanningInProgress = 'Scanning in progress, please wait ...';
//Result form
sSaveError = 'Error saving file:' + LineEnding + '%s';
sResults = 'Results';
sShowStatGraph = 'Show statistics graph';
sGeneralInfo = 'General Info';
sTranslationStatistics = 'Translation Statistics';
sDuplicateOriginalsTab = 'Duplicate Originals';
sCopy = '&Copy';
sSaveAs ='Save &As ...';
//Graphical summary form
sGrapStatFormCaption = 'Graphical summary';
sTranslatedStringsTotal = 'Translated strings (total: %s [%.1f%%])';
sUntranslatedStringsTotal = 'Untranslated strings (total: %s)';
sFuzzyStringsTotal = 'Fuzzy strings (total: %s)';
sTranslatedStrings = 'Translated strings';
sUntranslatedStrings = 'Untranslated strings';
sFuzzyStrings = 'Fuzzy strings';
sStatHint = 'Translated: %d (%.1f%%)' + LineEnding +
'Untranslated: %d (%.1f%%)' + LineEnding +
'Fuzzy: %d (%.1f%%)' + LineEnding +
'Errors in selected tests: %d';
SOpenFail = 'Unable to open file:' + LineEnding + '"%s"';
SOpenFailExternal = 'Unable to open file' + LineEnding +
'"%s"' + LineEnding + 'in external editor' + LineEnding + '"%s"';
sCreatingIconXofY = 'Creating icon nr. %d of %d';
sOpenFileInSystemPOEditor = 'Open file in system PO editor';
sOpenFileInExternalEditor = 'Open file in external editor';
sOpenFileInIDEEditor = 'Open file in IDE editor';
sRefreshCurrentTranslationFamily = 'Refresh current translation family';
sRefreshAllTranslationFamilies = 'Refresh all translation families';
sProcessingTranslationFamilyOf = 'Processing translation family %s of %s';
sProcessingTranslationFamily = 'Processing translation family...';
sCannotWriteFileYouCanPressRetryToRefreshThisTransl = 'Cannot write file%'
+'s%s%s%sYou can press "Retry" to refresh this translation family again and '
+'continue.';
//PoFamiles
sOriginal = 'Original';
sTranslation = 'Translation';
sErrorsByTest = 'Errors / warnings reported by %s for:';
sFile = 'File %s';
sCheckNumberOfItems = 'Check number of items';
sCheckForIncompatibleFormatArguments = 'Check for incompatible format '
+'arguments';
sCheckMissingIdentifiers = 'Check missing identifiers';
sCheckForMismatchesInUntranslatedStrings = 'Check for mismatches of originals';
sIncompatibleFormatArgs = '[Line: %d] Incompatible and/or invalid format() arguments for:' ;
sNrErrorsFound = 'Found %d errors.';
sNrWarningsFound = 'Found %d warnings.';
sLineInFileName = '[Line %d] in %s:';
sIdentifierNotFoundIn = 'Identifier [%s] not found in %s';
sMissingMasterIdentifier = 'Identifier [%s] found in %s, but it does not exist in %s';
sLineNr = '[Line: %d]';
sNoteTranslationIsFuzzy = 'Note: translation is fuzzy';
sNrOfItemsMisMatch = 'Mismatch in number of items for master and child';
sNrOfItemsMismatchD = '%s: %d items';
sDuplicateOriginals = 'Original value "%s" is used for more than 1 entry:';
sDuplicateLineNrWithValue = '[Line %d] %s';
sPercTranslated = '%s: %5.1f%% translated strings.';
sPercUntranslated = '%s: %5.1f%% untranslated strings.';
sPercFuzzy = '%s: %5.1f%% fuzzy strings.';
sTheFollowingOrphanedPoFileSFound = 'The following %s orphaned .po file(s) found:';
sTheFollowingMissingMasterPoFileSWereRemoved = 'The following %s '
+'missing master .po file(s) were removed from the list:';
sTroublesomeFiles = 'Troublesome files';
const
mrOpenEditorFile = mrNone+100;
type
{
Currently supported lanuages in Lazarus.
Please keep alphabetically when introducing a new one
}
TLangID = (
lang_all, {All languages}
lang_af_ZA, {Afrikaans}
lang_ar, {Arabic}
lang_ca, {Catalan}
lang_cs, {Czech}
lang_de, {German}
lang_en, {English}
lang_es, {Spanish}
lang_fi, {Finnish}
lang_fr, {French}
lang_he, {Hebrew}
lang_hu, {Hungarian}
lang_id, {Indonesian}
lang_it, {Italian}
lang_ja, {Japanese}
lang_lt, {Lithuanian}
lang_nl, {Dutch}
lang_pl, {Polish}
lang_pt, {Portuguese}
lang_pt_BR, {Brazilian Portuguese}
lang_ru, {Russian}
lang_sk, {Slovak}
lang_tr, {Turkish}
lang_uk, {Ukrainian}
lang_zh_CN {Chinese, simplified}
);
resourcestring
rs_lang_all = 'All languages';
rs_lang_af_ZA = 'Afrikaans';
rs_lang_ar = 'Arabic';
rs_lang_ca = 'Catalan';
rs_lang_cs = 'Czech';
rs_lang_de = 'German';
rs_lang_en = 'English';
rs_lang_es = 'Spanish';
rs_lang_fi = 'Finnish';
rs_lang_fr = 'French';
rs_lang_he = 'Hebrew';
rs_lang_hu = 'Hungarian';
rs_lang_id = 'Indonesian';
rs_lang_it = 'Italian';
rs_lang_ja = 'Japanese';
rs_lang_lt = 'Lithuanian';
rs_lang_nl = 'Dutch';
rs_lang_pl = 'Polish';
rs_lang_pt = 'Portuguese';
rs_lang_pt_BR = 'Brazilian Portuguese';
rs_lang_ru = 'Russian';
rs_lang_sk = 'Slovak';
rs_lang_tr = 'Turkish';
rs_lang_uk = 'Ukrainian';
rs_lang_zh_CN = 'Chinese, simplified';
const
LanguageNames: Array[TLangID] of String = (
rs_lang_all ,
rs_lang_af_ZA,
rs_lang_ar ,
rs_lang_ca ,
rs_lang_cs ,
rs_lang_de ,
rs_lang_en ,
rs_lang_es ,
rs_lang_fi ,
rs_lang_fr ,
rs_lang_he ,
rs_lang_hu ,
rs_lang_id ,
rs_lang_it ,
rs_lang_ja ,
rs_lang_lt ,
rs_lang_nl ,
rs_lang_pl ,
rs_lang_pt ,
rs_lang_pt_BR,
rs_lang_ru ,
rs_lang_sk ,
rs_lang_tr ,
rs_lang_uk ,
rs_lang_zh_CN
);
LanguageAbbr: Array[TLangID] of String = (
'', {Defaut language} //in LangFilter: All Languages
'af_ZA', {Afrikaans}
'ar', {Arabic}
'ca', {Catalan}
'cs', {Czech}
'de', {German}
'en', {English}
'es', {Spanish}
'fi', {Finnish}
'fr', {French}
'he', {Hebrew}
'hu', {Hungarian}
'id', {Indonesian}
'it', {Italian}
'ja', {Japanese}
'lt', {Lithuanian}
'nl', {Dutch}
'pl', {Polish}
'pt', {Portuguese}
'pt_BR', {Brazilian Portuguese}
'ru', {Russian}
'sk', {Slovak}
'tr', {Turkish}
'uk', {Ukrainian}
'zh_CN' {Chinese, simplified}
);
function LangAbbrToLangId(const Abbr: String): TLangID;
procedure LocalizeLanguageNames;
implementation
function LangAbbrToLangId(const Abbr: String): TLangID;
var
ID: TLangID;
begin
Result := lang_all;
for ID := Low(TLangID) to High(TLangID) do
begin
if LanguageAbbr[ID] = Abbr then
Exit(ID);
end;
end;
procedure LocalizeLanguageNames;
begin
LanguageNames[lang_all]:=rs_lang_all;
LanguageNames[lang_af_ZA]:=rs_lang_af_ZA;
LanguageNames[lang_ar]:=rs_lang_ar;
LanguageNames[lang_ca]:=rs_lang_ca;
LanguageNames[lang_cs]:=rs_lang_cs;
LanguageNames[lang_de]:=rs_lang_de;
LanguageNames[lang_en]:=rs_lang_en;
LanguageNames[lang_es]:=rs_lang_es;
LanguageNames[lang_fi]:=rs_lang_fi;
LanguageNames[lang_fr]:=rs_lang_fr;
LanguageNames[lang_he]:=rs_lang_he;
LanguageNames[lang_hu]:=rs_lang_hu;
LanguageNames[lang_id]:=rs_lang_id;
LanguageNames[lang_it]:=rs_lang_it;
LanguageNames[lang_ja]:=rs_lang_ja;
LanguageNames[lang_lt]:=rs_lang_lt;
LanguageNames[lang_nl]:=rs_lang_nl;
LanguageNames[lang_pl]:=rs_lang_pl;
LanguageNames[lang_pt]:=rs_lang_pt;
LanguageNames[lang_pt_BR]:=rs_lang_pt_BR;
LanguageNames[lang_ru]:=rs_lang_ru;
LanguageNames[lang_sk]:=rs_lang_sk;
LanguageNames[lang_tr]:=rs_lang_tr;
LanguageNames[lang_uk]:=rs_lang_uk;
LanguageNames[lang_zh_CN]:=rs_lang_zh_CN;
end;
end.
|