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