Imported Upstream version 1.9.8
[platform/upstream/doxygen.git] / src / translator_sk.h
index 875e92c..545a1d8 100644 (file)
@@ -32,7 +32,7 @@
 #ifndef TRANSLATOR_SK_H
 #define TRANSLATOR_SK_H
 
-class TranslatorSlovak : public Translator
+class TranslatorSlovak : public TranslatorAdapter_1_8_15
 {
   public:
     // --- Language control methods -------------------
@@ -41,8 +41,22 @@ class TranslatorSlovak : public Translator
     { return "slovak"; }
 
     virtual QCString latexLanguageSupportCommand()
-    { return "\\usepackage[slovak]{babel}\n"; }
-
+    { return "\\usepackage[slovak]{babel}\n"
+             "\\usepackage{regexpatch}\n"
+             "\\makeatletter\n"
+             "% Change the `-` delimiter to an active character\n"
+             "\\xpatchparametertext\\@@@cmidrule{-}{\\cA-}{}{}\n"
+             "\\xpatchparametertext\\@cline{-}{\\cA-}{}{}\n"
+             "\\makeatother\n";
+    }
+    virtual QCString trISOLang()
+    {
+      return "sk";
+    }
+    virtual QCString getLanguageString()
+    {
+      return "0x41B Slovak";
+    }
     // --- Language translation methods -------------------
 
     /*! used in the compound documentation before a list of related functions. */
@@ -57,6 +71,10 @@ class TranslatorSlovak : public Translator
     virtual QCString trDetailedDescription()
     { return "Detailný popis"; }
 
+    /*! header that is used when the summary tag is missing inside the details tag */
+    virtual QCString trDetails()
+    { return "Podrobnosti"; }
+
     /*! header that is put before the list of typedefs. */
     virtual QCString trMemberTypedefDocumentation()
     { return "Dokumentácia k členským typom"; }
@@ -72,7 +90,7 @@ class TranslatorSlovak : public Translator
     /*! header that is put before the list of member attributes. */
     virtual QCString trMemberDataDocumentation()
     {
-      if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+      if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
       {
         return "Dokumentácia k položkám";
       }
@@ -105,11 +123,11 @@ class TranslatorSlovak : public Translator
     /*! this is put at the author sections at the bottom of man pages.
      * parameter s is name of the project name.
      */
-    virtual QCString trGeneratedAutomatically(const char *s)
+    virtual QCString trGeneratedAutomatically(const QCString &s)
     { QCString result("Generované automaticky programom Doxygen "
                       "zo zdrojových textov");
-      if (s)
-          result+=(QCString)" projektu "+s;
+      if (!s.isEmpty())
+          result+=" projektu "+s;
       result+=".";
       return result;
     }
@@ -141,7 +159,7 @@ class TranslatorSlovak : public Translator
     /*! This is put above each page as a link to the list of annotated classes */
     virtual QCString trCompoundList()
     {
-      if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+      if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
       {
         return "Dátové štruktúry";
       }
@@ -158,7 +176,7 @@ class TranslatorSlovak : public Translator
     /*! This is put above each page as a link to all members of compounds. */
     virtual QCString trCompoundMembers()
     {
-      if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+      if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
       {
         return "Dátové položky";
       }
@@ -171,7 +189,7 @@ class TranslatorSlovak : public Translator
     /*! This is put above each page as a link to all members of files. */
     virtual QCString trFileMembers()
     {
-      if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+      if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
       {
         return "Globálne symboly";
       }
@@ -211,7 +229,7 @@ class TranslatorSlovak : public Translator
     /*! This is an introduction to the annotated compound list. */
     virtual QCString trCompoundListDescription()
     {
-      if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+      if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
       {
         return "Nasledujúci zoznam obsahuje identifikáciu dátových "
                "štruktúr a ich stručné popisy:";
@@ -235,7 +253,7 @@ class TranslatorSlovak : public Translator
         result += "dokumentovaných ";
       }
 
-      if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+      if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
       {
         result += "položiek štruktúr (struct) a unionov (union) ";
       }
@@ -248,7 +266,7 @@ class TranslatorSlovak : public Translator
 
       if (!extractAll)
       {
-        if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+        if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
         {
           result += "dokumentáciu štruktúr/unionov, ku ktorým prislúchajú:";
         }
@@ -259,7 +277,7 @@ class TranslatorSlovak : public Translator
       }
       else
       {
-        if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+        if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
         {
           result+="štruktúry/uniony, ku ktorým prislúchajú:";
         }
@@ -278,7 +296,7 @@ class TranslatorSlovak : public Translator
       QCString result="Tu nájdete zoznam všetkých ";
       if (!extractAll) result+="dokumentovaných ";
 
-      if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+      if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
       {
         result+="funkcií, premenných, makier, enumerácií a definícií typov (typedef) "
                 "s odkazmi na ";
@@ -334,7 +352,7 @@ class TranslatorSlovak : public Translator
      */
     virtual QCString trCompoundIndex()
     {
-      if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+      if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
       {
         return "Register dátových štruktúr";
       }
@@ -368,18 +386,6 @@ class TranslatorSlovak : public Translator
     virtual QCString trFileDocumentation()
     { return "Dokumentácia súborov"; }
 
-    /*! This is used in LaTeX as the title of the chapter containing
-     * the documentation of all examples.
-     */
-    virtual QCString trExampleDocumentation()
-    { return "Dokumentácia príkladov"; }
-
-    /*! This is used in LaTeX as the title of the chapter containing
-     * the documentation of all related pages.
-     */
-    virtual QCString trPageDocumentation()
-    { return "Dokumentácia súvisiacich stránok"; }
-
     /*! This is used in LaTeX as the title of the document */
     virtual QCString trReferenceManual()
     { return "Referenčná príručka"; }
@@ -455,7 +461,7 @@ class TranslatorSlovak : public Translator
      */
     virtual QCString trCompounds()
     {
-      if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+      if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
       {
         return "Dátové štruktúry";
       }
@@ -468,24 +474,20 @@ class TranslatorSlovak : public Translator
     /*! This is used in the standard footer of each page and indicates when
      * the page was generated
      */
-    virtual QCString trGeneratedAt(const char *date,const char *projName)
+    virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
     {
-      QCString result=(QCString)"Generované "+date;
-      if (projName) result+=(QCString)" pre projekt "+projName;
-      result+=(QCString)" programom";
+      QCString result="Generované "+date;
+      if (!projName.isEmpty()) result+=" pre projekt "+projName;
+      result+=" programom";
       return result;
     }
 
     /*! this text is put before a class diagram */
-    virtual QCString trClassDiagram(const char *clName)
+    virtual QCString trClassDiagram(const QCString &clName)
     {
-      return (QCString)"Diagram dedičnosti pre triedu "+clName;
+      return "Diagram dedičnosti pre triedu "+clName;
     }
 
-    /*! this text is generated when the \\internal command is used. */
-    virtual QCString trForInternalUseOnly()
-    { return "Iba pre interné použitie."; }
-
     /*! this text is generated when the \\warning command is used. */
     virtual QCString trWarning()
     { return "Pozor"; }
@@ -554,7 +556,7 @@ class TranslatorSlovak : public Translator
 //////////////////////////////////////////////////////////////////////////
 
     /*! used as the title of the HTML page of a class/struct/union */
-    virtual QCString trCompoundReference(const char *clName,
+    virtual QCString trCompoundReference(const QCString &clName,
                                     ClassDef::CompoundType compType,
                                     bool isTemplate)
     {
@@ -576,7 +578,7 @@ class TranslatorSlovak : public Translator
     }
 
     /*! used as the title of the HTML page of a file */
-    virtual QCString trFileReference(const char *fileName)
+    virtual QCString trFileReference(const QCString &fileName)
     {
       QCString result("Dokumentácia súboru ");
       result+=fileName;
@@ -584,7 +586,7 @@ class TranslatorSlovak : public Translator
     }
 
     /*! used as the title of the HTML page of a namespace */
-    virtual QCString trNamespaceReference(const char *namespaceName)
+    virtual QCString trNamespaceReference(const QCString &namespaceName)
     {
       QCString result("Dokumentácia priestoru mien ");
       result+=namespaceName;
@@ -732,7 +734,7 @@ class TranslatorSlovak : public Translator
         bool single)
     { // here s is one of " Class", " Struct" or " Union"
       // single is true implies a single file
-      QCString result=(QCString)"Dokumentácia pre ";
+      QCString result="Dokumentácia pre ";
       switch(compType)
       {
         case ClassDef::Class:     result+="túto triedu"; break;
@@ -796,14 +798,14 @@ class TranslatorSlovak : public Translator
 //////////////////////////////////////////////////////////////////////////
 
     /*! this text is put before a collaboration diagram */
-    virtual QCString trCollaborationDiagram(const char *clName)
+    virtual QCString trCollaborationDiagram(const QCString &clName)
     {
-      return (QCString)"Diagram tried pre "+clName+":";
+      return "Diagram tried pre "+clName+":";
     }
     /*! this text is put before an include dependency graph */
-    virtual QCString trInclDepGraph(const char *fName)
+    virtual QCString trInclDepGraph(const QCString &fName)
     {
-      return (QCString)"Graf závislostí na vkladaných súboroch "
+      return "Graf závislostí na vkladaných súboroch "
                     "pre "+fName+":";
     }
     /*! header that is put before the list of constructor/destructors. */
@@ -877,7 +879,7 @@ class TranslatorSlovak : public Translator
     }
     virtual QCString trPublicAttribs()
     {
-      if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+      if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
       {
         return "Dátové položky";
       }
@@ -1080,14 +1082,9 @@ class TranslatorSlovak : public Translator
       return "Triedy";
     }
     /*! Used as the title of a Java package */
-    virtual QCString trPackage(const char *name)
+    virtual QCString trPackage(const QCString &name)
     {
-      return (QCString)"Balík "+name;
-    }
-    /*! Title of the package index page */
-    virtual QCString trPackageList()
-    {
-      return "Zoznam balíkov";
+      return "Balík "+name;
     }
     /*! The description of the package index page */
     virtual QCString trPackageListDescription()
@@ -1319,14 +1316,18 @@ class TranslatorSlovak : public Translator
     /*! Used as a heading for a list of Java class functions with package
      * scope.
      */
-    virtual QCString trPackageMembers()
+    virtual QCString trPackageFunctions()
     {
       return "Funkcie v balíku";
     }
+    virtual QCString trPackageMembers()
+    {
+      return "Členy v balíku";
+    }
     /*! Used as a heading for a list of static Java class functions with
      *  package scope.
      */
-    virtual QCString trStaticPackageMembers()
+    virtual QCString trStaticPackageFunctions()
     {
       return "Statické funkcie v balíku";
     }
@@ -1440,19 +1441,10 @@ class TranslatorSlovak : public Translator
     virtual QCString trDirectories()
     { return "Adresáre"; }
 
-    /*! This returns a sentences that introduces the directory hierarchy.
-     *  and the fact that it is sorted alphabetically per level
-     */
-    virtual QCString trDirDescription()
-    {
-        return "Následujúca hierarchia adresárov je zhruba, "
-                      "ale nie úplne, zoradená podľa abecedy:";
-    }
-
     /*! This returns the title of a directory page. The name of the
      *  directory is passed via \a dirName.
      */
-    virtual QCString trDirReference(const char *dirName)
+    virtual QCString trDirReference(const QCString &dirName)
     {
         QCString result = "Referencia k adresáru ";
         result += dirName;
@@ -1585,7 +1577,7 @@ class TranslatorSlovak : public Translator
     }
 
     /*! used as the title of the HTML page of a module/type (Fortran) */
-    virtual QCString trCompoundReferenceFortran(const char *clName,
+    virtual QCString trCompoundReferenceFortran(const QCString &clName,
                                     ClassDef::CompoundType compType,
                                     bool isTemplate)
     {
@@ -1607,7 +1599,7 @@ class TranslatorSlovak : public Translator
 
     }
     /*! used as the title of the HTML page of a module (Fortran) */
-    virtual QCString trModuleReference(const char *namespaceName)
+    virtual QCString trModuleReference(const QCString &namespaceName)
     {
       QCString result="Dokumentácia modulu ";
       result += namespaceName;
@@ -1658,7 +1650,7 @@ class TranslatorSlovak : public Translator
         bool single)
     { // here s is one of " Module", " Struct" or " Union"
       // single is true implies a single file
-      QCString result=(QCString)"Dokumentácia ";
+      QCString result="Dokumentácia ";
       switch(compType)
       {
         case ClassDef::Class:      result+="k tomuto modulu"; break;
@@ -1707,7 +1699,7 @@ class TranslatorSlovak : public Translator
 //////////////////////////////////////////////////////////////////////////
 
     /*! directory relation for \a name */
-    virtual QCString trDirRelation(const char *name)
+    virtual QCString trDirRelation(const QCString &name)
     {
       return "Relácia " + QCString(name);
     }
@@ -1744,18 +1736,18 @@ class TranslatorSlovak : public Translator
      *  table is shown. The heading for the first column mentions the
      *  source file that has a relation to another file.
      */
-    virtual QCString trFileIn(const char *name)
+    virtual QCString trFileIn(const QCString &name)
     {
-      return (QCString)"Súbor v "+name;
+      return "Súbor v "+name;
     }
 
     /*! when clicking a directory dependency label, a page with a
      *  table is shown. The heading for the second column mentions the
      *  destination file that is included.
      */
-    virtual QCString trIncludesFileIn(const char *name)
+    virtual QCString trIncludesFileIn(const QCString &name)
     {
-      return (QCString)"Vkladá (include) súbor z "+name;
+      return "Vkladá (include) súbor z "+name;
     }
 
     /** Compiles a date string.
@@ -1770,20 +1762,45 @@ class TranslatorSlovak : public Translator
      */
     virtual QCString trDateTime(int year,int month,int day,int dayOfWeek,
                                 int hour,int minutes,int seconds,
-                                bool includeTime)
+                                DateTimeType includeTime)
     {
       static const char *days[]   = { "po","ut","st","št","pi","so","ne" };
       static const char *months[] = { "jan","feb","mar","apr","máj","jún","júl","aug","sep","okt","nov","dec" };
       QCString sdate;
-      sdate.sprintf("%s %d. %s %d",days[dayOfWeek-1],day,months[month-1],year);
-      if (includeTime)
+      if (includeTime == DateTimeType::DateTime || includeTime == DateTimeType::Date)
+      {
+        sdate.sprintf("%s %d. %s %d",days[dayOfWeek-1],day,months[month-1],year);
+      }
+      if (includeTime == DateTimeType::DateTime) sdate += " ";
+      if (includeTime == DateTimeType::DateTime || includeTime == DateTimeType::Time)
       {
         QCString stime;
-        stime.sprintf(" %.2d.%.2d:%.2d",hour,minutes,seconds);
+        stime.sprintf("%.2d.%.2d:%.2d",hour,minutes,seconds);
         sdate+=stime;
       }
       return sdate;
     }
+    virtual QCString trDayOfWeek(int dayOfWeek, bool first_capital, bool full)
+    {
+      static const char *days_short[]   = { "po", "ut", "st", "št", "pi", "so", "ne" };
+      static const char *days_full[]    = { "pondelok", "utorok", "streda", "štvrtok", "piatok", "sobota", "nedeľa" };
+      QCString text  = full? days_full[dayOfWeek-1] : days_short[dayOfWeek-1];
+      if (first_capital) return text.mid(0,1).upper()+text.mid(1);
+      else return text;
+    }
+    virtual QCString trMonth(int month, bool first_capital, bool full)
+    {
+      static const char *months_short[] = { "jan", "feb", "mar", "apr", "máj", "jún", "júl", "aug", "sep", "okt", "nov", "dec" };
+      static const char *months_full[]  = { "január", "február", "marec", "apríl", "máj", "jún", "júl", "august", "september", "október", "november", "december" };
+      QCString text  = full? months_full[month-1] : months_short[month-1];
+      if (first_capital) return text.mid(0,1).upper()+text.mid(1);
+      else return text;
+    }
+    virtual QCString trDayPeriod(int period)
+    {
+      static const char *dayPeriod[] = { "AM", "PM" };
+      return dayPeriod[period];
+    }
 
 //////////////////////////////////////////////////////////////////////////
 // new since 1.7.5
@@ -1798,7 +1815,7 @@ class TranslatorSlovak : public Translator
     { return "Copyright"; }
 
     /*! Header for the graph showing the directory dependencies */
-    virtual QCString trDirDepGraph(const char *name)
+    virtual QCString trDirDepGraph(const QCString &name)
     { return QCString("Graf závislosti na priečinkoch pre  ")+name+":"; }
 
 //////////////////////////////////////////////////////////////////////////
@@ -1817,7 +1834,7 @@ class TranslatorSlovak : public Translator
     virtual QCString trAndMore(const QCString &number)
     {
         QCString result("a " + number + " ďaľší");
-        if (atoi(number) >= 5)
+        if (number.toInt() >= 5)
             result += "ch";
         return result + "...";
     }
@@ -1833,11 +1850,11 @@ class TranslatorSlovak : public Translator
     }
 
     /*! Header of a Java enum page (Java enums are represented as classes). */
-    virtual QCString trEnumReference(const char *name)
+    virtual QCString trEnumReference(const QCString &name)
     { return "Referencia k enumerácii "+QCString(name); }
 
     /*! Used for a section containing inherited members */
-    virtual QCString trInheritedFrom(const char *members,const char *what)
+    virtual QCString trInheritedFrom(const QCString &members,const QCString &what)
     { return QCString(members)+" dedí sa z "+what; }
 
     /*! Header of the sections with inherited members specific for the
@@ -1866,7 +1883,7 @@ class TranslatorSlovak : public Translator
      */
     virtual QCString trProvidedByCategory()
     {
-      return "Deklarované v kategórii @1.";
+      return "Deklarované v kategórii @0.";
     }
 
     /*! Used in a method of an Objective-C category that extends a class.
@@ -1875,7 +1892,7 @@ class TranslatorSlovak : public Translator
      */
     virtual QCString trExtendsClass()
     {
-      return "Rozširuje triedu @1.";
+      return "Rozširuje triedu @0.";
     }
 
     /*! Used as the header of a list of class methods in Objective-C.
@@ -1901,14 +1918,6 @@ class TranslatorSlovak : public Translator
       return "Dokumentácia metódy";
     }
 
-    /*! Used as the title of the design overview picture created for the
-     *  VHDL output.
-     */
-    virtual QCString trDesignOverview()
-    {
-      return "Návrhová schéma";
-    }
-
 //////////////////////////////////////////////////////////////////////////
 // new since 1.8.4
 //////////////////////////////////////////////////////////////////////////
@@ -1926,21 +1935,21 @@ class TranslatorSlovak : public Translator
     { return "Konštantné skupiny"; }
 
     /** UNO IDL constant groups */
-    virtual QCString trConstantGroupReference(const char *namespaceName)
+    virtual QCString trConstantGroupReference(const QCString &namespaceName)
     {
       QCString result="Konštantné skupiny z ";
       result += namespaceName;
       return result;
     }
     /** UNO IDL service page title */
-    virtual QCString trServiceReference(const char *sName)
+    virtual QCString trServiceReference(const QCString &sName)
     {
       QCString result="Popis služby ";
       result += sName;
       return result;
     }
     /** UNO IDL singleton page title */
-    virtual QCString trSingletonReference(const char *sName)
+    virtual QCString trSingletonReference(const QCString &sName)
     {
       QCString result="Popis singletonu ";
       result += sName;
@@ -1965,7 +1974,6 @@ class TranslatorSlovak : public Translator
       return result;
     }
 
-//////////////////////////////////////////////////////////////////////////
 };
 
 #endif // TRANSLATOR_SK_H