Changeset 190
- Timestamp:
- Jul 13, 2018, 5:16:39 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/AcronymDecoder.lpi
r184 r190 22 22 <UseVersionInfo Value="True"/> 23 23 <MajorVersionNr Value="1"/> 24 <MinorVersionNr Value=" 5"/>24 <MinorVersionNr Value="6"/> 25 25 <StringTable FileDescription="Acronym Decoder" ProductName="Acronym Decoder"/> 26 26 </VersionInfo> -
trunk/Forms/UFormCheck.pas
r186 r190 55 55 function IsUppercaseAlpha(Text: string): Boolean; 56 56 function IsAlpha(Text: string): Boolean; 57 function IsAcronym(Text: string): Boolean; 57 58 procedure ReportDifferencies; 58 59 function WordContainsLetters(Text, Letters: string): Boolean; … … 77 78 SAcronymCountContent = 'Content acronym count:'; 78 79 SAcronymCountSummary = 'Summary acronym count:'; 79 SDuplicateAcronymContent = ' Duplicate acronym %s with "%s" in document content.';80 SDuplicateAcronymSummary = ' Duplicate acronym %s with "%s" in acronym summary.';81 SMissingAcronymContent = ' Content acronym %s with meaning "%s" missing from summary acronyms.';82 SMissingAcronymSummary = ' Summary acronym %s with meaning "%s" missing from content acronyms.';83 80 SDuplicateAcronymContent = 'Warning: Duplicate acronym %s with "%s" in document body.'; 81 SDuplicateAcronymSummary = 'Warning: Duplicate acronym %s with "%s" in acronym summary.'; 82 SMissingAcronymContent = 'Warning: Document body acronym %s with meaning "%s" missing from acronym summary.'; 83 SMissingAcronymSummary = 'Warning: Summary acronym %s with meaning "%s" missing from document body.'; 84 SPluralAcronym = 'Note: Acronym %s is defined as plural in document body.'; 84 85 85 86 { TFormCheck } … … 218 219 HasMeaning1: Boolean; 219 220 HasMeaning2: Boolean; 221 Plural: Boolean; 220 222 begin 221 223 AcronymDbContent.Acronyms.Clear; … … 232 234 if EndIndex <> 0 then begin 233 235 Acronym := Trim(Copy(Text, StartIndex + 1, EndIndex - StartIndex - 1)); 234 if (Length(Acronym) > 1) and IsUppercaseAlpha(Acronym) then begin 236 // Allow plural acronyms with ending 's' character 237 if (Length(Acronym) >= 1) and (Acronym[Length(Acronym)] = 's') then begin 238 Acronym := Copy(Acronym, 1, Length(Acronym) - 1); 239 Plural := True; 240 end else Plural := False; 241 if IsAcronym(Acronym) then begin 235 242 HasMeaning1 := ParseMeaning(Acronym, Text, StartIndex - 1, Meaning1); 236 243 if HasMeaning1 then Meaning := Meaning1; … … 242 249 end; 243 250 if HasMeaning1 or HasMeaning2 then begin 251 // If plural acronym then try to remove ending 's' character from the meaning 252 if Plural then MemoReport.Lines.Add(Format(SPluralAcronym, [Acronym])); 253 if Plural and (Length(Meaning) >= 1) and (Meaning[Length(Meaning)] = 's') then begin 254 Meaning := Copy(Meaning, 1, Length(Meaning) - 1); 255 end; 244 256 if Assigned(AcronymDbContent.SearchAcronym(Acronym, Meaning)) then 245 257 MemoReport.Lines.Add(Format(SDuplicateAcronymContent, [Acronym, Meaning])) … … 360 372 end; 361 373 374 function TFormCheck.IsAcronym(Text: string): Boolean; 375 const 376 MinAcronymLength = 2; 377 begin 378 Result := (Length(Text) >= MinAcronymLength) and IsUppercaseAlpha(Text); 379 end; 380 362 381 procedure TFormCheck.ReportDifferencies; 363 382 var -
trunk/Languages/AcronymDecoder.cs.po
r189 r190 928 928 929 929 #: uformcheck.sduplicateacronymcontent 930 msgid " Duplicate acronym %s with \"%s\" in document content."931 msgstr " Zdvojená zkratka %s s významem \"%s\" v těle dokumentu."930 msgid "Warning: Duplicate acronym %s with \"%s\" in document body." 931 msgstr "Varování: Zdvojená zkratka %s s významem \"%s\" v těle dokumentu." 932 932 933 933 #: uformcheck.sduplicateacronymsummary 934 msgid " Duplicate acronym %s with \"%s\" in acronym summary."935 msgstr " Zdvojená zkratka %s s významem \"%s\" v přehledu zkratek."934 msgid "Warning: Duplicate acronym %s with \"%s\" in acronym summary." 935 msgstr "Varování: Zdvojená zkratka %s s významem \"%s\" v přehledu zkratek." 936 936 937 937 #: uformcheck.smissingacronymcontent 938 msgid " Content acronym %s with meaning \"%s\" missing from summary acronyms."939 msgstr "V zkratkách přehledu chybí zkratka obsahu %s s významem \"%s\"."938 msgid "Warning: Document body acronym %s with meaning \"%s\" missing from acronym summary." 939 msgstr "Varování: V zkratkách přehledu chybí zkratka těla dokumentu %s s významem \"%s\"." 940 940 941 941 #: uformcheck.smissingacronymsummary 942 msgid "Summary acronym %s with meaning \"%s\" missing from content acronyms." 943 msgstr "V zkratkách obsahu chybí zkratka přehledu %s s významem \"%s\"." 942 msgid "Warning: Summary acronym %s with meaning \"%s\" missing from document body." 943 msgstr "Ve zkratkách těla dokumentu chybí zkratka přehledu %s s významem \"%s\"." 944 945 #: uformcheck.spluralacronym 946 msgid "Note: Acronym %s is defined as plural in document body." 947 msgstr "Poznámka: Zkratka %s je definována v těle dokumentu v množném čísle." 944 948 945 949 #: uformexport.sexportedacronyms … … 1034 1038 msgid "Process import sources" 1035 1039 msgstr "Zpracovat zdroje importu" 1036 -
trunk/Languages/AcronymDecoder.po
r184 r190 918 918 919 919 #: uformcheck.sduplicateacronymcontent 920 msgid " Duplicate acronym %s with \"%s\" in document content."920 msgid "Warning: Duplicate acronym %s with \"%s\" in document body." 921 921 msgstr "" 922 922 923 923 #: uformcheck.sduplicateacronymsummary 924 msgid " Duplicate acronym %s with \"%s\" in acronym summary."924 msgid "Warning: Duplicate acronym %s with \"%s\" in acronym summary." 925 925 msgstr "" 926 926 927 927 #: uformcheck.smissingacronymcontent 928 msgid " Content acronym %s with meaning \"%s\" missing from summary acronyms."928 msgid "Warning: Document body acronym %s with meaning \"%s\" missing from acronym summary." 929 929 msgstr "" 930 930 931 931 #: uformcheck.smissingacronymsummary 932 msgid "Summary acronym %s with meaning \"%s\" missing from content acronyms." 932 msgid "Warning: Summary acronym %s with meaning \"%s\" missing from document body." 933 msgstr "" 934 935 #: uformcheck.spluralacronym 936 msgid "Note: Acronym %s is defined as plural in document body." 933 937 msgstr "" 934 938
Note:
See TracChangeset
for help on using the changeset viewer.