/****************************************************************************** * * * * Copyright (C) 1997-2000 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby * granted. No representations are made about the suitability of this software * for any purpose. It is provided "as is" without express or implied warranty. * See the GNU General Public License for more details. * * Documents produced by Doxygen are derivative works derived from the * input used in their production; they are not affected by this license. * */ // translation by Boris Bralo // Updates: // -------- // 2000/08/20 // - Better handling of ISO-8859-2/ WIN 1250 stuff based on (actualy stolen from :-)) Czech translations // implemented by Petr Prikryl (prikrylp@skil.cz). // As opposed to Czech translation this one assumes that Doxygen strings are written in Linux ( it's true, // I don't have QT pro licence ) , and uses ISOToWin function when built in WIN32 // #ifndef TRANSLATOR_HR_H #define TRANSLATOR_HR_H #include "translator.h" class TranslatorCroatian : public Translator { private: /*! to avoid macro redefinition from translator_cz.h */ /* Speed loss is actualy less than in Czech version due to fewer QCString copying. */ inline QCString& decode(const QCString& sInput) { #ifdef _WIN32 return ISOToWin(sInput); #else return const_cast(sInput); #endif } /*! returns the string converted from windows-1250 to iso-8859-2 */ QCString WinToISO(const QCString& sInput) { // The conversion table for characters >127 // static const char WinToISOTab[] = { '\x80', '\x81', '\x82', '\x83', '\x84', '\x85', '\x86', '\x87', '\x88', '\x89', '\xA9', '\x8B', '\xA6', '\xAB', '\xAE', '\xAC', '\x90', '\x91', '\x92', '\x93', '\x94', '\x2E', '\x96', '\x97', '\x98', '\x99', '\xB9', '\x9B', '\xB6', '\xBB', '\xBE', '\xBC', '\xA0', '\x20', '\x20', '\xA3', '\xA4', '\xA1', '\xA6', '\xA7', '\x22', '\xA9', '\xAA', '\x3C', '\xAC', '\x2D', '\xAE', '\xAF', '\x2E', '\x2B', '\x20', '\xB3', '\x27', '\x75', '\xB6', '\xB7', '\x20', '\xB1', '\xBA', '\x3E', '\xA5', '\x22', '\xB5', '\xBF', '\xC0', '\xC1', '\xC2', '\xC3', '\xC4', '\xC5', '\xC6', '\xC7', '\xC8', '\xC9', '\xCA', '\xCB', '\xCC', '\xCD', '\xCE', '\xCF', '\xD0', '\xD1', '\xD2', '\xD3', '\xD4', '\xD5', '\xD6', '\xD7', '\xD8', '\xD9', '\xDA', '\xDB', '\xDC', '\xDD', '\xDE', '\xDF', '\xE0', '\xE1', '\xE2', '\xE3', '\xE4', '\xE5', '\xE6', '\xE7', '\xE8', '\xE9', '\xEA', '\xEB', '\xEC', '\xED', '\xEE', '\xEF', '\xF0', '\xF1', '\xF2', '\xF3', '\xF4', '\xF5', '\xF6', '\x2D', '\xF8', '\xF9', '\xFA', '\xFB', '\xFC', '\xFD', '\xFE', '\xFF', '\0' }; QCString result; int len = sInput.length(); for (int i = 0; i < len; ++i) { unsigned int c = sInput[i]; result += (c > 127) ? WinToISOTab[c & 0x7F] : c; } return result; } /*! returns the string converted from iso-8859-2 to windows-1250 */ QCString ISOToWin(const QCString& sInput) { // The conversion table for characters >127 // static const char ISOToWinTab[] = { '\x80', '\x81', '\x82', '\x83', '\x84', '\x85', '\x86', '\x87', '\x88', '\x89', '\x8A', '\x8B', '\x8C', '\x8D', '\x8E', '\x8F', '\x90', '\x91', '\x92', '\x93', '\x94', '\x95', '\x96', '\x97', '\x98', '\x99', '\x9A', '\x9B', '\x9C', '\x9D', '\x9E', '\x9F', '\xA0', '\xA5', '\xA2', '\xA3', '\xA4', '\xBC', '\x8C', '\xA7', '\xA8', '\x8A', '\xAA', '\x8D', '\x8F', '\xAD', '\x8E', '\xAF', '\xB0', '\xB9', '\xB2', '\xB3', '\xB4', '\xBE', '\x9C', '\xB7', '\xB8', '\x9A', '\xBA', '\x9D', '\x9F', '\xBD', '\x9E', '\xBF', '\xC0', '\xC1', '\xC2', '\xC3', '\xC4', '\xC5', '\xC6', '\xC7', '\xC8', '\xC9', '\xCA', '\xCB', '\xCC', '\xCD', '\xCE', '\xCF', '\xD0', '\xD1', '\xD2', '\xD3', '\xD4', '\xD5', '\xD6', '\xD7', '\xD8', '\xD9', '\xDA', '\xDB', '\xDC', '\xDD', '\xDE', '\xDF', '\xE0', '\xE1', '\xE2', '\xE3', '\xE4', '\xE5', '\xE6', '\xE7', '\xE8', '\xE9', '\xEA', '\xEB', '\xEC', '\xED', '\xEE', '\xEF', '\xF0', '\xF1', '\xF2', '\xF3', '\xF4', '\xF5', '\xF6', '\xF7', '\xF8', '\xF9', '\xFA', '\xFB', '\xFC', '\xFD', '\xFE', '\xFF', '\0' }; QCString result; int len = sInput.length(); for (int i = 0; i < len; ++i) { unsigned int c = sInput[i]; result += (c > 127) ? ISOToWinTab[c & 0x7F] : c; } return result; } public: QCString idLanguage() { return "croatian"; } QCString idLanguageCharset() #ifdef _WIN32 { return "windows-1250"; } #else { return "iso-8859-2"; } #endif QCString latexBabelPackage() { return "croatian"; } QCString trRelatedFunctions() { return decode("Povezane funkcije"); } QCString trRelatedSubscript() { return decode("(To nisu member funkcije.)"); } QCString trDetailedDescription() { return decode("Detaljno objašnjenje"); } QCString trMemberTypedefDocumentation() { return decode("Dokumentacija typedef članova"); } QCString trMemberEnumerationDocumentation() { return decode("Dokumentacija enum članova"); } QCString trEnumerationValueDocumentation() { return decode("Dokumentacija enum vrijednosti"); } QCString trMemberFunctionDocumentation() { return decode("Dokumentacija funkcija"); } QCString trMemberDataDocumentation() { return decode("Documentacija varijabli"); } QCString trGeneratedFrom(const char *s,bool single) { QCString result= decode("Dokumentacija za ")+s+ decode("je generirana iz "); if (single) result+= decode("datoteke :"); else result+= decode("slijedećih datoteka:"); return result; } QCString trMore() { return decode("Opširnije..."); } QCString trListOfAllMembers() { return decode("Popis svih članova."); } QCString trMemberList() { return decode("Popis članova."); } QCString trThisIsTheListOfAllMembers() { return decode("Ovo je popis svih članova"); } QCString trIncludingInheritedMembers() { return decode(", uključujući naslijeđene članove."); } QCString trGeneratedAutomatically(const char *s) { QCString result=decode("generirano automatski Doxygen-om"); if (s) result+=(QCString)decode(" za ")+s; result+=decode(" iz programskog koda."); return result; } QCString trEnumName() { return decode("enum ime"); } QCString trEnumValue() { return decode("enum vrijednost"); } QCString trDefinedIn() { return decode("definirano u"); } QCString trVerbatimText(const char *f) { return (QCString)decode("Ovo je citirani tekst iz include datoteke ")+f+"."; } QCString trModules() { return decode("Moduli"); } QCString trClassHierarchy() { return decode("Stablo klasa"); } QCString trCompoundList() { return decode("Sve klase"); } QCString trFileList() { return decode("Popis datoteka"); } QCString trHeaderFiles() { return decode("Header datoteke"); } QCString trCompoundMembers() { return decode("Svi članovi"); } QCString trFileMembers() { return decode("Članovi(memberi) u datoteci"); } QCString trRelatedPages() { return decode("Povezane stranice"); } QCString trExamples() { return decode("Primjeri"); } QCString trSearch() { return decode("Traži"); } QCString trClassHierarchyDescription() { return decode("Stablo naslijeđivanja je posloženo " "približno po abecedi:"); } QCString trFileListDescription(bool extractAll) { QCString result=decode("Popis svih "); if (!extractAll) result+=decode("dokumentiranih "); result+=decode("datoteka, s kratkim opisom:"); return result; } QCString trCompoundListDescription() { return decode("Popis svih klasa, unija i struktura " "s kratkim opisom :"); } QCString trCompoundMembersDescription(bool extractAll) { QCString result=decode("Popis svih "); if (!extractAll) result+=decode("dokumentiranih "); result+=decode("članova klasa s linkovima na "); if (extractAll) result+=decode("dokumentaciju svakog člana:"); else result+=decode("dokumentaciju klase :"); return result; } QCString trFileMembersDescription(bool extractAll) { QCString result=decode("Popis svih "); if (!extractAll) result+=decode("dokumentiranih "); result+=decode("članova s linkovima na "); if (extractAll) result+=decode("dokumentaciju datoteke u kojima se nalaze:"); else result+=decode("datoteke u kojima se nalaze:"); return result; } QCString trHeaderFilesDescription() { return decode("Popis header datoteka koje čine API :"); } QCString trExamplesDescription() { return decode("Popis primjera :"); } QCString trRelatedPagesDescription() { return decode("Popis povezanih stranica:"); } QCString trModulesDescription() { return decode("Popis svih modula:"); } QCString trNoDescriptionAvailable() { return decode("Opis nije dostupan"); } QCString trDocumentation() { return decode("Dokumentacija"); } QCString trModuleIndex() { return decode("Indeks modula"); } QCString trHierarchicalIndex() { return decode("Hijerarhijski indeks"); } QCString trCompoundIndex() { return decode("Skupni indeks"); } QCString trFileIndex() { return decode("Indeks datoteka"); } QCString trModuleDocumentation() { return decode("Dokumentacija modula"); } QCString trClassDocumentation() { return decode("Dokumentacija klasa"); } QCString trFileDocumentation() { return decode("Dokumentacija datoteka"); } QCString trExampleDocumentation() { return decode("Dokumentacija primjera"); } QCString trPageDocumentation() { return decode("Dokumentacija za povezane stranice"); } QCString trReferenceManual() { return decode("Priručnik"); } QCString trDefines() { return decode("Define-ovi"); } QCString trFuncProtos() { return decode("Prototipi funkcija"); } QCString trTypedefs() { return decode("Typedef-ovi"); } QCString trEnumerations() { return decode("Enumeracije"); } QCString trFunctions() { return decode("Funkcije"); } QCString trVariables() { return decode("Varijable"); } QCString trEnumerationValues() { return decode("Vrijednosti enum-ova"); } QCString trAuthor() { return decode("autor"); } QCString trDefineDocumentation() { return decode("Dokumentacija define-a"); } QCString trFunctionPrototypeDocumentation() { return decode("Dokumentacija prototipa funkcije"); } QCString trTypedefDocumentation() { return decode("Dokumentacija typedef-a"); } QCString trEnumerationTypeDocumentation() { return decode("Dokumentacija enum tipa"); } QCString trFunctionDocumentation() { return decode("Dokumentacije funkcijs"); } QCString trVariableDocumentation() { return decode("Dokumentacija varijable"); } QCString trCompounds() { return decode("Strukture"); } QCString trFiles() { return decode("Datoteke"); } QCString trGeneratedAt(const char *date,const char *projName) { QCString result=(QCString)decode("Generirano ")+date; if (projName) result+=(QCString)decode(" projekt: ")+projName; result+=(QCString)decode(" generator: "); return result; } QCString trWrittenBy() { return decode("napisao "); } QCString trClassDiagram(const char *clName) { return decode("Dijagram klasa za ")+clName; } QCString trForInternalUseOnly() { return decode("Isključivo za internu uporabu."); } QCString trReimplementedForInternalReasons() { return decode("Reimplementirano zbog internih razloga; " "Nema utjecaja na API."); } QCString trWarning() { return decode("Upozorenje"); } QCString trBugsAndLimitations() { return decode("Greške i ograničenja"); } QCString trVersion() { return decode("Verzija"); } QCString trDate() { return decode("Datum"); } QCString trAuthors() { return decode("Autor(i)"); } QCString trReturns() { return decode("Povratne vrijednosti"); } QCString trSeeAlso() { return decode("Vidi također"); } QCString trParameters() { return decode("Parametri"); } QCString trExceptions() { return decode("Iznimke"); } QCString trGeneratedBy() { return decode("Generirao"); } ////////////////////////////////////////////////////////////////////////// // new since 0.49-990307 ////////////////////////////////////////////////////////////////////////// QCString trNamespaceList() { return decode("Popis namespace-ova"); } QCString trNamespaceListDescription(bool extractAll) { QCString result=decode("Popis svih "); if (!extractAll) result+=decode("dokumentiranih "); result+=decode("namespace-ova s kratkim opisom:"); return result; } QCString trFriends() { return decode("Friend-ovi "); } ////////////////////////////////////////////////////////////////////////// // new since 0.49-990405 ////////////////////////////////////////////////////////////////////////// QCString trRelatedFunctionDocumentation() { return decode("Dokumentacija povezanih funkcija"); } ////////////////////////////////////////////////////////////////////////// // new since 0.49-990425 ////////////////////////////////////////////////////////////////////////// QCString trCompoundReference(const char *clName, ClassDef::CompoundType compType, bool /*isTemplate*/) // used as the title of the HTML page of a class/struct/union { QCString result=decode("Opis "); switch(compType) { case ClassDef::Class: result+=decode(" klase "); break; case ClassDef::Struct: result+=decode(" strukture "); break; case ClassDef::Union: result+=decode(" unije "); break; case ClassDef::Interface: result+=decode(" sučelja (interface) "); break; case ClassDef::Exception: result+=decode(" iznimke (exception) "); break; } result += (QCString)clName; return result; } QCString trFileReference(const char *fileName) // used as the title of the HTML page of a file { QCString result=decode("Opis datoteke "); result+=fileName; return result; } QCString trNamespaceReference(const char *namespaceName) // used as the title of the HTML page of a namespace { QCString result =decode("Opis namespace-a "); result+=namespaceName; return result; } // these are for the member sections of a class, struct or union QCString trPublicMembers() { return decode("Public članovi"); } QCString trPublicSlots() { return decode("Public slotovi"); } QCString trSignals() { return decode("Signali"); } QCString trStaticPublicMembers() { return decode("Static public članovi"); } QCString trProtectedMembers() { return decode("Protected članovi"); } QCString trProtectedSlots() { return decode("Protected slotovi"); } QCString trStaticProtectedMembers() { return decode("Static protected članovi"); } QCString trPrivateMembers() { return decode("Private članovi"); } QCString trPrivateSlots() { return decode("Private slotovi"); } QCString trStaticPrivateMembers() { return decode("Static private članovi"); } // end of member sections QCString trWriteList(int numEntries) { // this function is used to produce a comma-separated list of items. // use generateMarker(i) to indicate where item i should be put. QCString result; int i; // the inherits list contain `numEntries' classes for (i=0;i