From: Fletcher T. Penney Date: Fri, 10 Mar 2017 00:58:11 +0000 (-0500) Subject: ADDED: Add French translations; fix typo in German X-Git-Tag: 6.0.0-b1^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=207a98101ed5f679f4b758415d56833ebc576b6e;p=multimarkdown ADDED: Add French translations; fix typo in German --- diff --git a/Sources/libMultiMarkdown/i18n.h b/Sources/libMultiMarkdown/i18n.h index 886a5bf..bdf71c0 100644 --- a/Sources/libMultiMarkdown/i18n.h +++ b/Sources/libMultiMarkdown/i18n.h @@ -37,7 +37,7 @@ #include -#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; diff --git a/Sources/libMultiMarkdown/mmd.c b/Sources/libMultiMarkdown/mmd.c index b8e498c..721b6b8 100644 --- a/Sources/libMultiMarkdown/mmd.c +++ b/Sources/libMultiMarkdown/mmd.c @@ -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; } diff --git a/Sources/libMultiMarkdown/writer.c b/Sources/libMultiMarkdown/writer.c index 9d1cbee..02ed040 100644 --- a/Sources/libMultiMarkdown/writer.c +++ b/Sources/libMultiMarkdown/writer.c @@ -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; diff --git a/tests/MMD6Tests/French.html b/tests/MMD6Tests/French.html index b54913c..1c04f68 100644 --- a/tests/MMD6Tests/French.html +++ b/tests/MMD6Tests/French.html @@ -21,16 +21,16 @@

foo…

-

[1]

+

[1]

-

[1]

+

[1]


  1. -

    foo  ↩

    +

    foo  ↩

@@ -41,7 +41,7 @@
  1. -

    foo  ↩

    +

    foo  ↩

diff --git a/tests/MMD6Tests/German Guillemets.html b/tests/MMD6Tests/German Guillemets.html index e84771e..07f8ffb 100644 --- a/tests/MMD6Tests/German Guillemets.html +++ b/tests/MMD6Tests/German Guillemets.html @@ -23,7 +23,7 @@

[1]

-

[1]

+

[1]


diff --git a/tests/MMD6Tests/German.html b/tests/MMD6Tests/German.html index 40f2672..0086a6f 100644 --- a/tests/MMD6Tests/German.html +++ b/tests/MMD6Tests/German.html @@ -23,7 +23,7 @@

[1]

-

[1]

+

[1]