Failed to get translated string for language: for language codes that don't exist

Hi all-

I just attempted to upgrade from Hugo v0.74.2 to v0.81.0. Upon doing so, when I build, I get the following a whole slew of warnings like this:

WARN 2021/04/08 09:33:18 Failed to get translated string for language "art-x-jp" and ID "search-navbar": %!s(<nil>)

or

WARN 2021/04/08 09:33:18 Failed to get translated string for language "art-x-kr" and ID "my-account": %!s(<nil>)

or

WARN 2021/04/08 09:33:19 Failed to get translated string for language "art-x-tw" and ID "sign-in": %!s(<nil>)
[...]

art-x-jp is not a language on my site; jp is. Same for kr and tw. For some reason, this only appears to happen with these three languages; not fr, de, etc.

Any ideas?

What do you find if you search for “search-navbar” or “my-account” or “sign-in”? It’s probably helpful too, to know what the layout code at these parameters is.

Good point!

Here is a spot where I call it from a layout file called site-navigation.html:

<label for="search"><input id="searchtext" type="text" name="q" size="24" value="" placeholder="{{ i18n "search-navbar" }}" /></label>  

Here is the key-value pair from tw.toml:

# This is the placeholder text in the search field on the top navbar
[search-navbar]
other = "搜尋"

See any red-flags? Given it’s only these languages, it smells like a character encoding issue.

Incidentally, I tried updating to Hugo v0.82.0 to see if this solved the issue, but it did not.

Just to be more complete, here are the languages we support on our site…

                   |  EN  | CN  | CS  | DE  | ES  | FR  |  IT  | JP  | KR  | PL  | PT  | RU  | TW
-------------------+------+-----+-----+-----+-----+-----+------+-----+-----+-----+-----+-----+------
  Pages            |  319 | 172 |  11 | 122 | 111 | 130 | 1230 | 120 | 120 |  11 |  11 |  31 | 158

Can you share the languages section of your site configuration file?

Sure…except you’re going to have to enable an attachment of that file-type in Discourse’s administration settings (right now, you’re limited to image file uploads; I could change the file extension from toml to png, but Discourse is too smart for that).

It’s big, so, in the meantime, to get around Discourse’s character limit, I’ll just include as many characters here as Discourse will allow…

[languages]
  [languages.en]
    title = "Rhinoceros - Modeling Tools for Designers"
    description = "Rhino is a 3D modeler used to create, edit, analyze, document, render, animate, and translate NURBS* curves, surfaces, and solids, point clouds, SubD surfaces, and polygon meshes. There are no limits on complexity, degree, or size beyond those of your hardware."
    author = "Robert McNeel & Associates"
    weight = 1
    languageName = "English"
    contentDir = "content/en"
    [languages.en.params]
      copyright = "Copyright © 1993-{year} Robert McNeel & Associates. All Rights Reserved."
      siteNav = "original-site-navigation"
      imagesDir = "images"
      docLang = "en-us" # the language code used on docs.mcneel.com
    [languages.en.taxonomies]
      "tag" = "tags"
      "category" = "categories"
      "platform" = "platforms"
      "task" = "tasks"
      "level" = "levels"
    [languages.en.menu]
      [[languages.en.menu.main]]
        identifier = "buy"
        # you can add extra information before the name (HTML format is supported), such as icons
        pre = ""
        # you can add extra information after the name (HTML format is supported), such as icons
        post = ""
        name = "buy"
        url = "https://www.rhino3d.com/buy/"
        # title will be shown when you hover on this menu link.
        title = ""
        weight = 1
      [[languages.en.menu.main]]
        identifier = "download"
        pre = ""
        post = ""
        name = "download"
        url = "https://www.rhino3d.com/download/"
        title = ""
        weight = 2
      [[languages.en.menu.main]]
        identifier = "gallery"
        pre = ""
        post = ""
        name = "gallery"
        url = "https://discourse.mcneel.com/c/gallery/46/l/top"
        title = ""
        weight = 3
      [[languages.en.menu.main]]
        identifier = "features"
        pre = ""
        post = ""
        name = "features"
        url = "https://www.rhino3d.com/features/"
        title = ""
        weight = 4
      [[languages.en.menu.main]]
        identifier = "news"
        pre = ""
        post = ""
        name = "news"
        url = "https://www.rhino3d.com/news/"
        title = ""
        weight = 5
      [[languages.en.menu.main]]
        identifier = "community"
        pre = ""
        post = ""
        name = "community"
        url = "https://discourse.mcneel.com"
        title = ""
        weight = 6
      [[languages.en.menu.main]]
        identifier = "learn"
        pre = ""
        post = ""
        name = "learn"
        url = "https://www.rhino3d.com/learn/"
        title = ""
        weight = 7
      [[languages.en.menu.main]]
        identifier = "support"
        pre = ""
        post = ""
        name = "support"
        url = "https://www.rhino3d.com/support/"
        title = ""
        weight = 8
      [[languages.en.menu.main]]
        identifier = "resources"
        pre = ""
        post = ""
        name = "resources"
        url = "https://www.rhino3d.com/resources/"
        title = ""
        weight = 9
  [languages.cs]
    title = "Rhinoceros - Modeling Tools for Designers"
    description = "Rhino is a 3D modeler used to create, edit, analyze, document, render, animate, and translate NURBS* curves, surfaces, and solids, point clouds, SubD surfaces, and polygon meshes. There are no limits on complexity, degree, or size beyond those of your hardware."
    author = "Robert McNeel & Associates"
    weight = 2
    languageName = "Czech"
    contentDir = "content/cs"
    [languages.cs.params]
      copyright = "Copyright © 1993-{year} Robert McNeel & Associates. All Rights Reserved."
      siteNav = "original-site-navigation"
      imagesDir = "images"
      docLang = "cs" # the language code used on docs.mcneel.com
      [languages.cs.params.navigation]
        help = "help"
    [languages.cs.taxonomies]
      "tag" = "tags"
      "category" = "categories"
      "platform" = "platforms"
      "task" = "tasks"
      "level" = "levels"
    [languages.cs.menu]
      [[languages.cs.menu.main]]
        identifier = "buy"
        # you can add extra information before the name (HTML format is supported), such as icons
        pre = ""
        # you can add extra information after the name (HTML format is supported), such as icons
        post = ""
        name = "buy"
        url = "https://www.rhino3d.com/buy/"
        # title will be shown when you hover on this menu link.
        title = ""
        weight = 1
      [[languages.cs.menu.main]]
        identifier = "download"
        pre = ""
        post = ""
        name = "download"
        url = "https://www.rhino3d.com/download/"
        title = ""
        weight = 2
      [[languages.cs.menu.main]]
        identifier = "gallery"
        pre = ""
        post = ""
        name = "gallery"
        url = "https://discourse.mcneel.com/c/gallery/46/l/top"
        title = ""
        weight = 3
      [[languages.cs.menu.main]]
        identifier = "features"
        pre = ""
        post = ""
        name = "features"
        url = "https://www.rhino3d.com/features/"
        title = ""
        weight = 4
      [[languages.cs.menu.main]]
        identifier = "news"
        pre = ""
        post = ""
        name = "news"
        url = "https://www.rhino3d.com/news/"
        title = ""
        weight = 5
      [[languages.cs.menu.main]]
        identifier = "community"
        pre = ""
        post = ""
        name = "community"
        url = "https://discourse.mcneel.com"
        title = ""
        weight = 6
      [[languages.cs.menu.main]]
        identifier = "learn"
        pre = ""
        post = ""
        name = "learn"
        url = "https://www.rhino3d.com/learn/"
        title = ""
        weight = 7
      [[languages.cs.menu.main]]
        identifier = "support"
        pre = ""
        post = ""
        name = "support"
        url = "https://www.rhino3d.com/support/"
        title = ""
        weight = 8
      [[languages.cs.menu.main]]
        identifier = "resources"
        pre = ""
        post = ""
        name = "resources"
        url = "https://www.rhino3d.com/resources/"
        title = ""
        weight = 9
  [languages.cn]
    title = "Rhinoceros - 设计建模工具"
    description = "Rhino 是一种 3D 建模工具,可以对 NURBS* 曲线、曲面、实体、点云、SubD物件和多边形网格进行创建、编辑、分析、记录、渲染、动画制作和转换,只要硬件条件允许,不受复杂度、阶数和尺寸的限制。"
    author = "Robert McNeel & Associates"
    weight = 2
    languageName = "中文简体"
    contentDir = "content/cn"
    [languages.cn.params]
      copyright = "Copyright © 1993-{year} Robert McNeel & Associates. 版权所有."
      siteNav = "original-site-navigation"
      imagesDir = "images"
      docLang = "zh-cn" # the language code used on docs.mcneel.com
      [languages.cn.params.navigation]
        help = "help"
    [languages.cn.taxonomies]
      "tag" = "tags"
      "category" = "categories"
      "platform" = "platforms"
      "task" = "tasks"
      "level" = "levels"
    [languages.cn.menu]
      [[languages.cn.menu.main]]
        identifier = "buy"
        # you can add extra information before the name (HTML format is supported), such as icons
        pre = ""
        # you can add extra information after the name (HTML format is supported), such as icons
        post = ""
        name = "购买"
        url = "https://www.rhino3d.com/buy/"
        # title will be shown when you hover on this menu link.
        title = ""
        weight = 1
      [[languages.cn.menu.main]]
        identifier = "download"
        pre = ""
        post = ""
        name = "下载"
        url = "https://www.rhino3d.com/download/"
        title = ""
        weight = 2
      [[languages.cn.menu.main]]
        identifier = "gallery"
        pre = ""
        post = ""
        name = "作品"
        url = "https://discourse.mcneel.com/c/gallery/46/l/top"
        title = ""
        weight = 3
      [[languages.cn.menu.main]]
        identifier = "features"
        pre = ""
        post = ""
        name = "功能"
        url = "https://www.rhino3d.com/features/"
        title = ""
        weight = 4
      [[languages.cn.menu.main]]
        identifier = "news"
        pre = ""
        post = ""
        name = "新闻"
        url = "https://www.rhino3d.com/news/"
        title = ""
        weight = 5
      [[languages.cn.menu.main]]
        identifier = "community"
        pre = ""
        post = ""
        name = "社区"
        url = "https://discourse.mcneel.com"
        title = ""
        weight = 6
      [[languages.cn.menu.main]]
        identifier = "learn"
        pre = ""
        post = ""
        name = "学习"
        url = "https://www.rhino3d.com/learn/"
        title = ""
        weight = 7
      [[languages.cn.menu.main]]
        identifier = "support"
        pre = ""
        post = ""
        name = "支持"
        url = "https://www.rhino3d.com/support/"
        title = ""
        weight = 8
      [[languages.cn.menu.main]]
        identifier = "resources"
        pre = ""
        post = ""
        name = "资源"
        url = "https://www.rhino3d.com/resources/"
        title = ""
        weight = 9
  [languages.de]
    title = "Rhinoceros - Modellierungswerkzeuge für Designer"
    description = "Rhino ist ein 3D-Modellierer zum Erzeugen, Bearbeiten, Analysieren, Dokumentieren, Rendern, Animieren und Übersetzen von NURBS*-Kurven, -Flächen und -Volumenkörpern, Punktwolken, SubD-Flächen und Polygonnetzen. Es gibt keinerlei Beschränkeung auf Komplexität, Grad oder Größe außer durch Ihre Hardware."
    author = "Robert McNeel & Associates"
    weight = 3
    languageName = "German"
    contentDir = "content/de"
    [languages.de.params]
      copyright = "Copyright © 1993-{year} Robert McNeel & Associates. Alle Rechte vorbehalten."
      siteNav = "original-site-navigation"
      imagesDir = "images"
      docLang = "de-de" # the language code used on docs.mcneel.com
      [languages.de.params.navigation]
        help = "help"
    [languages.de.taxonomies]
      "Markierung" = "Markierungen"
      "Kategorie" = "Kategorien"
      "Plattform" = "Plattformen"
      "Aufgabe" = "Aufgaben"
      "Ebene" = "Ebenen"
    [languages.de.menu]
      [[languages.de.menu.main]]
        identifier = "buy"
        # you can add extra information before the name (HTML format is supported), such as icons
        pre = ""
        # you can add extra information after the name (HTML format is supported), such as icons
        post = ""
        name = "Kauf"
        url = "https://www.rhino3d.com/buy/"
        # title will be shown when you hover on this menu link.
        title = ""
        weight = 1
      [[languages.de.menu.main]]
        identifier = "download"
        pre = ""
        post = ""
        name = "Download"
        url = "https://www.rhino3d.com/download/"
        title = ""
        weight = 2
      [[languages.de.menu.main]]
        identifier = "gallery"
        pre = ""
        post = ""
        name = "Galerie"
        url = "https://discourse.mcneel.com/c/gallery/46/l/top"
        title = ""
        weight = 3
      [[languages.de.menu.main]]
        identifier = "features"
        pre = ""
        post = ""
        name = "Eigenschaften"
        url = "https://www.rhino3d.com/features/"
        title = ""
        weight = 4
      [[languages.de.menu.main]]
        identifier = "news"
        pre = ""
        post = ""
        name = "Neuigkeiten"
        url = "https://www.rhino3d.com/news/"
        title = ""
        weight = 5
      [[languages.de.menu.main]]
        identifier = "community"
        pre = ""
        post = ""
        name = "Community"
        url = "https://discourse.mcneel.com"
        title = ""
        weight = 6
      [[languages.de.menu.main]]
        identifier = "learn"
        pre = ""
        post = ""
        name = "Schulung"
        url = "https://www.rhino3d.com/learn/"
        title = ""
        weight = 7
      [[languages.de.menu.main]]
        identifier = "support"
        pre = ""
        post = ""
        name = "Support"
        url = "https://www.rhino3d.com/support/"
        title = ""
        weight = 8
      [[languages.de.menu.main]]
        identifier = "resources"
        pre = ""
        post = ""
        name = "Ressourcen"
        url = "https://www.rhino3d.com/resources/"
        title = ""
        weight = 9
  [languages.es]
    title = "Rhinoceros - Herramientas de modelado para diseñadores"
    description = "Rhino es un modelador 3D que se utiliza para crear, editar, analizar, documentar, renderizar, animar y traducir curvas NURBS*, superficies y sólidos, nubes de puntos, superficies SubD y mallas poligonales. No hay límite de complejidad, grado o tamaño, a parte del que tenga su hardware."
    author = "Robert McNeel & Associates"
    weight = 4
    languageName = "Español"
    contentDir = "content/es"
    [languages.es.params]
      copyright = "Copyright © 1993-{year} Robert McNeel & Associates. Todos los derechos reservados."
      #rhinoURL = "https://www.rhino3d.com/es"
      siteNav = "original-site-navigation"
      imagesDir = "images"
      docLang = "es-es" # the language code used on docs.mcneel.com
      [languages.es.params.navigation]
        help = "Ayuda"
    [languages.es.taxonomies]
      "etiqueta" = "etiquetas"
      "categoría" = "categorías"
      "plataforma" = "plataformas"
      "tarea" = "tareas"
      "nivel" = "niveles"
    [languages.es.menu]
      [[languages.es.menu.main]]
        identifier = "buy"
        # you can add extra information before the name (HTML format is supported), such as icons
        pre = ""
        # you can add extra information after the name (HTML format is supported), such as icons
        post = ""
        name = "comprar"
        url = "https://www.rhino3d.com/buy/"
        # title will be shown when you hover on this menu link.
        title = ""
        weight = 1
      [[languages.es.menu.main]]
        identifier = "download"
        pre = ""
        post = ""
        name = "descargar"
        url = "https://www.rhino3d.com/download/"
        title = ""
        weight = 2
      [[languages.es.menu.main]]
        identifier = "gallery"
        pre = ""
        post = ""
        name = "galería"
        url = "https://discourse.mcneel.com/c/gallery/46/l/top"
        title = ""
        weight = 3
      [[languages.es.menu.main]]
        identifier = "features"
        pre = ""
        post = ""
        name = "características"
        url = "https://www.rhino3d.com/features/"
        title = ""
        weight = 4
      [[languages.es.menu.main]]
        identifier = "news"
        pre = ""
        post = ""
        name = "noticias"
        url = "https://www.rhino3d.com/news/"
        title = ""
        weight = 5
      [[languages.es.menu.main]]
        identifier = "community"
        pre = ""
        post = ""
        name = "comunidad"
        url = "https://discourse.mcneel.com"
        title = ""
        weight = 6
      [[languages.es.menu.main]]
        identifier = "learn"
        pre = ""
        post = ""
        name = "formación"
        url = "https://www.rhino3d.com/learn/"
        title = ""
        weight = 7
      [[languages.es.menu.main]]
        identifier = "support"
        pre = ""
        post = ""
        name = "soporte"
        url = "https://www.rhino3d.com/support/"
        title = ""
        weight = 8
      [[languages.es.menu.main]]
        identifier = "resources"
        pre = ""
        post = ""
        name = "recursos"
        url = "https://www.rhino3d.com/resources/"
        title = ""
        weight = 9
  [languages.fr]
    title = "Rhinoceros - Outils de modélisation pour les designers"
    description = "Rhino est un modeleur 3D utilisé pour créer, éditer, analyser, documenter, rendre, animer et traduire des courbes et des surfaces NURBS* ainsi que des solides, des nuages de points, des surfaces SubD et des maillages. Aucune limite en termes de complexité, de degré ou de taille, en dehors de celles de votre matériel."
    author = "Robert McNeel & Associates"
    weight = 5
    languageName = "Français"
    contentDir = "content/fr"
    [languages.fr.params]
      copyright = "Copyright © 1993-{year} Robert McNeel & Associates. Tous droits réservés."
      siteNav = "original-site-navigation"
      imagesDir = "images"
      docLang = "fr-fr"
      [languages.fr.params.navigation]
        help = "aide"
    [languages.fr.taxonomies]
      "étiquette" = "étiquettes"
      "catégorie" = "catégories"
      "plateforme" = "plateformes"
      "tâche" = "tâches"
      "niveau" = "niveaux"
    [languages.fr.menu]
      [[languages.fr.menu.main]]
        identifier = "buy"
        # you can add extra information before the name (HTML format is supported), such as icons
        pre = ""
        # you can add extra information after the name (HTML format is supported), such as icons
        post = ""
        name = "achat"
        url = "https://www.rhino3d.com/buy/"
        # title will be shown when you hover on this menu link.
        title = ""
        weight = 1
      [[languages.fr.menu.main]]
        identifier = "download"
        pre = ""
        post = ""
        name = "télécharger"
        url = "https://www.rhino3d.com/download/"
        title = ""
        weight = 2
      [[languages.fr.menu.main]]
        identifier = "gallery"
        pre = ""
        post = ""
        name = "galerie"
        url = "https://discourse.mcneel.com/c/gallery/46/l/top"
        title = ""
        weight = 3
      [[languages.fr.menu.main]]
        identifier = "features"
        pre = ""
        post = ""
        name = "fonctions"
        url = "https://www.rhino3d.com/features/"
        title = ""
        weight = 4
      [[languages.fr.menu.main]]
        identifier = "news"
        pre = ""
        post = ""
        name = "infos"
        url = "https://www.rhino3d.com/news/"
        title = ""
        weight = 5
      [[languages.fr.menu.main]]
        identifier = "community"
        pre = ""
        post = ""
        name = "communauté"
        url = "https://discourse.mcneel.com"
        title = ""
        weight = 6
      [[languages.fr.menu.main]]
        identifier = "learn"
        pre = ""
        post = ""
        name = "apprendre"
        url = "https://www.rhino3d.com/learn/"
        title = ""
        weight = 7
      [[languages.fr.menu.main]]
        identifier = "support"
        pre = ""
        post = ""
        name = "aide"
        url = "https://www.rhino3d.com/support/"
        title = ""
        weight = 8
      [[languages.fr.menu.main]]
        identifier = "resources"
        pre = ""
        post = ""
        name = "ressources"
        url = "https://www.rhino3d.com/resources/"
        title = ""
        weight = 9
  [languages.it]
    title = "Rhinoceros - Strumenti di modellazione per progettisti"
    description = "Rhino è uno strumento di modellazione 3D usato per creare, modificare, analizzare, documentare, renderizzare, animare e tradurre curve e superfici NURBS* così come solidi, nuvole di punti, superfici SubD e mesh poligonali. Non esistono limiti in termini di complessità, grado o dimensione oltre a quelli dell'hardware utilizzato."
    author = "Robert McNeel & Associates"
    weight = 6
    languageName = "Italiano"
    contentDir = "content/it"
    [languages.it.params]
      copyright = "Copyright © 1993-{year} Robert McNeel & Associates. Tutti i diritti riservati."
      siteNav = "original-site-navigation"
      imagesDir = "images"
      docLang = "it-it" # the language code used on docs.mcneel.com
      [languages.it.params.navigation]
        help = "help"
    [languages.it.taxonomies]
      "tag" = "tag"
      "category" = "categorie"
      "platform" = "piattaforme"
      "task" = "attività"
      "level" = "livelli"
    [languages.it.menu]
      [[languages.it.menu.main]]
        identifier = "buy"
        # you can add extra information before the name (HTML format is supported), such as icons
        pre = ""
        # you can add extra information after the name (HTML format is supported), such as icons
        post = ""
        name = "acquista"
        url = "https://www.rhino3d.com/buy/"
        # title will be shown when you hover on this menu link.
        title = ""
        weight = 1
      [[languages.it.menu.main]]
        identifier = "download"
        pre = ""
        post = ""
        name = "download"
        url = "https://www.rhino3d.com/download/"
        title = ""
        weight = 2
      [[languages.it.menu.main]]
        identifier = "gallery"
        pre = ""
        post = ""
        name = "galleria"
        url = "https://discourse.mcneel.com/c/gallery/46/l/top"
        title = ""
        weight = 3
      [[languages.it.menu.main]]
        identifier = "features"
        pre = ""
        post = ""
        name = "funzionalità"
        url = "https://www.rhino3d.com/features/"
        title = ""
        weight = 4
      [[languages.it.menu.main]]
        identifier = "news"
        pre = ""
        post = ""
        name = "notizie"
        url = "https://www.rhino3d.com/news/"
        title = ""
        weight = 5
      [[languages.it.menu.main]]
        identifier = "community"
        pre = ""
        post = ""
        name = "comunità"
        url = "https://discourse.mcneel.com"
        title = ""
        weight = 6
      [[languages.it.menu.main]]
        identifier = "learn"
        pre = ""
        post = ""
        name = "formazione"
        url = "https://www.rhino3d.com/learn/"
        title = ""
        weight = 7
      [[languages.it.menu.main]]
        identifier = "support"
        pre = ""
        post = ""
        name = "supporto"
        url = "https://www.rhino3d.com/support/"
        title = ""
        weight = 8
      [[languages.it.menu.main]]
        identifier = "resources"
        pre = ""
        post = ""
        name = "risorse"
        url = "https://www.rhino3d.com/resources/"
        title = ""
        weight = 9
  [languages.jp]
    title = "Rhinoceros - デザイナのためのモデリングツール"
    description = "Rhino is a 3D modeler used to create, edit, analyze, document, render, animate, and translate NURBS* curves, surfaces, and solids, point clouds, SubD surfaces, and polygon meshes. There are no limits on complexity, degree, or size beyond those of your hardware."
    author = "Robert McNeel & Associates"
    weight = 7
    languageName = "日本語"
    contentDir = "content/jp"
    [languages.jp.params]
      copyright = "Copyright © 1993-{year} Robert McNeel & Associates. All Rights Reserved."
      #rhinoURL = "https://www.rhino3d.com/jp"
      siteNav = "original-site-navigation"
      imagesDir = "images"
      docLang = "ja-jp"
    [languages.jp.taxonomies]
      "タグ" = "タグ"
      "カテゴリ" = "カテゴリ"
      "プラットフォーム" = "プラットフォーム"
      "タスク" = "タスク"
      "レベル" = "レベル"
    [languages.jp.menu]
      [[languages.jp.menu.main]]
        identifier = "buy"
        # you can add extra information before the name (HTML format is supported), such as icons
        pre = ""
        # you can add extra information after the name (HTML format is supported), such as icons
        post = ""
        name = "購入"
        url = "https://www.rhino3d.com/buy/"
        # title will be shown when you hover on this menu link.
        title = ""
        weight = 1
      [[languages.jp.menu.main]]
        identifier = "download"
        pre = ""
        post = ""
        name = "ダウンロード"
        url = "https://www.rhino3d.com/download/"
        title = ""
        weight = 2
      [[languages.jp.menu.main]]
        identifier = "gallery"
        pre = ""
        post = ""
        name = "ギャラリー"
        url = "https://discourse.mcneel.com/c/gallery/46/l/top"
        title = ""
        weight = 3
      [[languages.jp.menu.main]]
        identifier = "features"
        pre = ""
        post = ""
        name = "特長"
        url = "https://www.rhino3d.com/features/"
        title = ""
        weight = 4
      [[languages.jp.menu.main]]
        identifier = "news"
        pre = ""
        post = ""
        name = "ニュース"
        url = "https://www.rhino3d.com/news/"
        title = ""
        weight = 5
      [[languages.jp.menu.main]]
        identifier = "community"
        pre = ""
        post = ""
        name = "コミュニティ"
        url = "https://discourse.mcneel.com"
        title = ""
        weight = 6
      [[languages.jp.menu.main]]
        identifier = "learn"
        pre = ""
        post = ""
        name = "学ぶ"
        url = "https://www.rhino3d.com/learn/"
        title = ""
        weight = 7
      [[languages.jp.menu.main]]
        identifier = "support"
        pre = ""
        post = ""
        name = "サポート"
        url = "https://www.rhino3d.com/support/"
        title = ""
        weight = 8
      [[languages.jp.menu.main]]
        identifier = "resources"
        pre = ""
        post = ""
        name = "リソース"
        url = "https://www.rhino3d.com/resources/"
        title = ""
        weight = 9
  [languages.kr]
    title = "Rhinoceros - 디자이너를 위한 모델링 도구"
    description = "Rhino는 NURBS* 커브, 서피스, 솔리드, 점구름, SubD 서피스, 다각형 메쉬를 생성, 편집, 분석/해석, 문서화, 렌더링, 애니메이션화, 변환하는 데 사용되는 3D 모델러입니다. 사용하시는 하드웨어의 한계를 넘어 정밀도, 복잡한 정도, 각도 또는 크기에 제한이 없습니다."
    author = "Robert McNeel & Associates"
    weight = 8
    languageName = "한국어"
    contentDir = "content/kr"
    [languages.kr.params]
      copyright = "Copyright © 1993-{year} Robert McNeel & Associates. All Rights Reserved."
      rhinoURL = "https://www.rhino3d.com/kr"
      siteNav = "original-site-navigation"
      imagesDir = "images"
      docLang = "ko-kr" # the language code used on docs.mcneel.com
      [languages.kr.params.navigation]
        help = "도움말"
    [languages.kr.taxonomies]
      "태그" = "태그"
      "카테고리" = "카테고리"
      "플랫폼" = "플랫폼"
      "작업" = "작업"
      "레벨" = "레벨"
    [languages.kr.menu]
      [[languages.kr.menu.main]]
        identifier = "buy"
        # you can add extra information before the name (HTML format is supported), such as icons
        pre = ""
        # you can add extra information after the name (HTML format is supported), such as icons
        post = ""
        name = "구매"
        url = "https://www.rhino3d.com/buy/"
        # title will be shown when you hover on this menu link.
        title = ""
        weight = 1
      [[languages.kr.menu.main]]
        identifier = "download"
        pre = ""
        post = ""
        name = "다운로드"
        url = "https://www.rhino3d.com/download/"
        title = ""
        weight = 2
      [[languages.kr.menu.main]]
        identifier = "gallery"
        pre = ""
        post = ""
        name = "갤러리"
        url = "https://discourse.mcneel.com/c/gallery/46/l/top"
        title = ""
        weight = 3
      [[languages.kr.menu.main]]
        identifier = "features"
        pre = ""
        post = ""
        name = "기능"
        url = "https://www.rhino3d.com/features/"
        title = ""
        weight = 4
      [[languages.kr.menu.main]]
        identifier = "news"
        pre = ""
        post = ""
        name = "뉴스"
        url = "https://www.rhino3d.com/news/"
        title = ""
        weight = 5
      [[languages.kr.menu.main]]
        identifier = "community"
        pre = ""
        post = ""
        name = "커뮤니티"
        url = "https://discourse.mcneel.com"
        title = ""
        weight = 6
      [[languages.kr.menu.main]]
        identifier = "learn"
        pre = ""
        post = ""
        name = "학습"
        url = "https://www.rhino3d.com/learn/"
        title = ""
        weight = 7
      [[languages.kr.menu.main]]
        identifier = "support"
        pre = ""
        post = ""
        name = "지원"
        url = "https://www.rhino3d.com/support/"
        title = ""
        weight = 8
      [[languages.kr.menu.main]]
        identifier = "resources"
        pre = ""
        post = ""
        name = "리소스"
        url = "https://www.rhino3d.com/resources/"
        title = ""
        weight = 9
  [languages.tw]
    title = "Rhinoceros - 設計師的建模工具"
    description = "Rhino 是 3D 建模器,可以建立、編輯、分析、標註、彩現及轉換 NURBS 曲線、曲面、實體、細分幾何 (SubD)、點雲與網格,只要硬體條件許可,沒有複雜度、階數與大小的限制。"
    author = "Robert McNeel & Associates"
    weight = 12
    languageName = "中文繁體"
    contentDir = "content/tw"
    [languages.tw.params]
      copyright = "Copyright © 1993-{year} Robert McNeel & Associates. All Rights Reserved."
      siteNav = "original-site-navigation"
      imagesDir = "images"
      docLang = "zh-tw" # the language code used on docs.mcneel.com
      [languages.tw.params.navigation]
        help = "help"
    [languages.tw.taxonomies]
      "tag" = "tags"
      "category" = "categories"
      "platform" = "platforms"
      "task" = "tasks"
      "level" = "levels"
    [languages.tw.menu]
      [[languages.tw.menu.main]]
        identifier = "buy"
        # you can add extra information before the name (HTML format is supported), such as icons
        pre = ""
        # you can add extra information after the name (HTML format is supported), such as icons
        post = ""
        name = "購買"
        url = "https://www.rhino3d.com/buy/"
        # title will be shown when you hover on this menu link.
        title = ""
        weight = 1
      [[languages.tw.menu.main]]
        identifier = "download"
        pre = ""
        post = ""
        name = "下載"
        url = "https://www.rhino3d.com/download/"
        title = ""
        weight = 2
      [[languages.tw.menu.main]]
        identifier = "gallery"
        pre = ""
        post = ""
        name = "作品"
        url = "https://discourse.mcneel.com/c/gallery/46/l/top"
        title = ""
        weight = 3
      [[languages.tw.menu.main]]
        identifier = "features"
        pre = ""
        post = ""
        name = "功能"
        url = "https://www.rhino3d.com/features/"
        title = ""
        weight = 4
      [[languages.tw.menu.main]]
        identifier = "news"
        pre = ""
        post = ""
        name = "新聞"
        url = "https://www.rhino3d.com/news/"
        title = ""
        weight = 5
      [[languages.tw.menu.main]]
        identifier = "community"
        pre = ""
        post = ""
        name = "論壇"
        url = "https://chinese.discourse.mcneel.com"
        title = ""
        weight = 6
      [[languages.tw.menu.main]]
        identifier = "learn"
        pre = ""
        post = ""
        name = "學習"
        url = "https://www.rhino3d.com/learn/"
        title = ""
        weight = 7
      [[languages.tw.menu.main]]
        identifier = "support"
        pre = ""
        post = ""
        name = "支援"
        url = "https://www.rhino3d.com/support/"
        title = ""
        weight = 8
      [[languages.tw.menu.main]]
        identifier = "resources"
        pre = ""
        post = ""
        name = "資源"
        url = "https://www.rhino3d.com/resources/"
        title = ""
        weight = 9

Thanks for looking into this!

Maybe you could create a public gist instead?

I’ve reached out here for a minimal reproducible example of the problem. When we discussed your site a few days ago you were unable to share the full repository, at least publicly. Can you share it privately with me via PM?

Sure. Let me do some work to reproduce a minimal sample so I can share it.

1 Like

I don’t understand the details yet, but jp, kr, and tw are treated as “artificial” language codes. This clue lead me to this list.

Artificial Standard
jp ja
kr ko
tw zh-tw

So, probably not what you want to hear, but changing the language codes in config.toml and renaming the i18n files makes the warnings go away. But it also changes the URL from which those languages are served.

We switched from V1 to V2 of nicksnyder/go-i18n in Hugo v0.76. That change had some unexpected side effects.

Sorry for the delayed reply…just catching up after some time away.

Unfortunately that last part - changing the url from which the languages are served - prevents us from using this workaround. I guess we’re in a bit of a bind. Changing the language codes would require a bunch of work on our reverse-proxy and would just serve to confuse things.

It seems to me that this part of the Hugo documentation is misleading:

From Hugo 0.31 you no longer need to use a valid language code. It can be anything.
See Custom language codes not support in multilingual setup · Issue #3564 · gohugoio/hugo · GitHub

Yikes, this is being discussed in a few places - just as much my fault as any - so I’m adding this link here too: Failed to get translated string for language "art-x-language" · Issue #7838 · gohugoio/hugo · GitHub

@dbelcher There’s been some progress on this, but it will be a while…
https://github.com/nicksnyder/go-i18n/pull/253

I will get a fix out for this the next week (one way or another).

2 Likes