]> granicus.if.org Git - multimarkdown/commitdiff
ADDED: Add French translations; fix typo in German
authorFletcher T. Penney <fletcher@fletcherpenney.net>
Fri, 10 Mar 2017 00:58:11 +0000 (19:58 -0500)
committerFletcher T. Penney <fletcher@fletcherpenney.net>
Fri, 10 Mar 2017 00:58:11 +0000 (19:58 -0500)
Sources/libMultiMarkdown/i18n.h
Sources/libMultiMarkdown/mmd.c
Sources/libMultiMarkdown/writer.c
tests/MMD6Tests/French.html
tests/MMD6Tests/German Guillemets.html
tests/MMD6Tests/German.html

index 886a5bf3fbb4413d000678bc88f55323f7d6b0be..bdf71c0c5e0e55df3e3572f199613249d8ab1737 100644 (file)
@@ -37,7 +37,7 @@
 #include <stdlib.h>
 
 
-#define kNumberOfLanguages 3
+#define kNumberOfLanguages 4
 #define kNumberOfStrings 4
 #define kLanguage 0
 
@@ -73,18 +73,22 @@ static const char * lc_lookup[kNumberOfLanguages * kNumberOfStrings] = {
        "return to body",                               // English
        "return to body",                               // Español
        "Zum Haupttext",                                // Deutsch
+       "Retour au texte principal",    // Français
 
        "see footnote",                                 // English
        "Ver nota de pie",                              // Español
        "Siehe Fußnote",                               // Deutsch
+       "Voir note de bas de page",             // Français
 
        "see citation",                                 // English
        "see citation",                                 // Español
        "Siehe Zitat",                                  // Deutsch
+       "Voir citation",                                // Français
 
        "see glossary",                                 // English
        "see glossary",                                 // Español
        "Siehe Glossar",                                // Deutsch
+       "Voir glossaire",                               // Français
 };
 
 
@@ -125,6 +129,7 @@ enum lc_languages {
        LC_EN = 0,                      //!< English is default
        LC_ES,                          //!< Español
        LC_DE,                          //!< Deutsch
+       LC_FR,                          //!< Français
 };
 
 
@@ -134,6 +139,8 @@ static inline short i18n_language_from_string(const char * l) {
                return LC_ES;
        } else if (strcmp(l, "de") == 0) {
                return LC_DE;
+       } else if (strcmp(l, "fr") == 0) {
+               return LC_FR;
        }
 
        return 0;
index b8e498c2dfe6aa601c410d1fa0def879f558dc18..721b6b823c2d437262715a3f761e53912cd9636c 100644 (file)
@@ -194,15 +194,18 @@ void mmd_engine_set_language(mmd_engine * e, short language) {
        e->language = language;
 
        switch (language) {
-               case LC_EN:
-                       e->quotes_lang = ENGLISH;
-                       break;
                case LC_DE:
                        e->quotes_lang = GERMAN;
                        break;
+               case LC_EN:
+                       e->quotes_lang = ENGLISH;
+                       break;
                case LC_ES:
                        e->quotes_lang = ENGLISH;
                        break;
+               case LC_FR:
+                       e->quotes_lang = FRENCH;
+                       break;
                default:
                        e->quotes_lang = ENGLISH;
        }
index 9d1cbee2e5f9c7c3d244045ee26d5628aee04080..02ed040b7542fd52e4d3727659f48b7bd253d367 100644 (file)
@@ -1414,7 +1414,7 @@ void process_metadata_stack(mmd_engine * e, scratch_pad * scratch) {
                                scratch->language = LC_DE;
                                scratch->quotes_lang = GERMAN;
                        } else if (strcmp(temp_char, "fr") == 0) {
-                               //scratch->language = LC_FR;
+                               scratch->language = LC_FR;
                                scratch->quotes_lang = FRENCH;
                        } else if (strcmp(temp_char, "nl") == 0) {
                                //scratch->language = LC_NL;
index b54913c5c7885ec26f1f313972fefba9603920bf..1c04f68644f08c331b85e22ea8dc568f7bdd4def 100644 (file)
 
 <p>foo&#8230;</p>
 
-<p><a href="#fn:1" id="fnref:1" title="see footnote" class="footnote">[1]</a></p>
+<p><a href="#fn:1" id="fnref:1" title="Voir note de bas de page" class="footnote">[1]</a></p>
 
-<p><a href="#cn:1" id="cnref:1" title="see citation" class="citation">[1]</a></p>
+<p><a href="#cn:1" id="cnref:1" title="Voir citation" class="citation">[1]</a></p>
 
 <div class="footnotes">
 <hr />
 <ol>
 
 <li id="fn:1">
-<p>foo <a href="#fnref:1" title="return to body" class="reversefootnote">&#160;&#8617;</a></p>
+<p>foo <a href="#fnref:1" title="Retour au texte principal" class="reversefootnote">&#160;&#8617;</a></p>
 </li>
 
 </ol>
@@ -41,7 +41,7 @@
 <ol>
 
 <li id="cn:1">
-<p>foo <a href="#cnref:1" title="return to body" class="reversecitation">&#160;&#8617;</a></p>
+<p>foo <a href="#cnref:1" title="Retour au texte principal" class="reversecitation">&#160;&#8617;</a></p>
 </li>
 
 </ol>
index e84771eebac8f7455b9116f2d6e7b440cf00c921..07f8ffbf81af1d05136868ce96f2da78077d67fc 100644 (file)
@@ -23,7 +23,7 @@
 
 <p><a href="#fn:1" id="fnref:1" title="Siehe Fußnote" class="footnote">[1]</a></p>
 
-<p><a href="#cn:1" id="cnref:1" title="siehe Zitat" class="citation">[1]</a></p>
+<p><a href="#cn:1" id="cnref:1" title="Siehe Zitat" class="citation">[1]</a></p>
 
 <div class="footnotes">
 <hr />
index 40f2672354a5e6991ec4cf0c3cc58f3250fe8528..0086a6f98d4b853b36471db9321f9515f1eee2ad 100644 (file)
@@ -23,7 +23,7 @@
 
 <p><a href="#fn:1" id="fnref:1" title="Siehe Fußnote" class="footnote">[1]</a></p>
 
-<p><a href="#cn:1" id="cnref:1" title="siehe Zitat" class="citation">[1]</a></p>
+<p><a href="#cn:1" id="cnref:1" title="Siehe Zitat" class="citation">[1]</a></p>
 
 <div class="footnotes">
 <hr />