Files
Reims-Go/internal/plugin/locale_test.go
T
NwflowerandClaude Opus 5.5 e259833b5f feat(plugins): rework the plugin market and first-run language packs
Market page
- Card grid that fills the width; cards show only icon, name,
  publisher (trust mark by color and icon), version and the action.
- Paints from cache via the new PeekPluginMarket binding, then revalidates;
  cards reveal 24 at a time as the feed scrolls.
- Category chips come from the index (MarketBrowseResult.kinds) instead of
  a fixed list; the alpha toggle and source badge are gone.
- Installed/Market is a segmented control; refresh now shows feedback.
- WordmarkLoader writes the Reims-Go wordmark stroke by stroke while the
  market loads (static pulse under reduced motion).

Install and enable
- reims:plugin-install events drive a progress bar on the card.
- After install, a dialog offers to enable the plugin and lists what it can
  do in plain words (PluginInfo.risks / MarketCatalogItem.risks, derived
  from tier, permissions and contributions in risks.go).
- Enabling a plugin that provides UI languages switches to the first one
  unless the current language is among them (PluginInfo.locales).

Trust
- A package installed from the project's own index, fetched over HTTPS in
  this session, inherits the index's trust level when its SHA-256 matches.
  Third-party indexes (REIMS_GO_PLUGIN_MARKET_URL) cannot vouch and show
  every entry as community.
- Trust no longer waives review: official packages get the same scan,
  high-risk approval and L3 hash check as any other; only builtin and
  bundled plugins are pre-approved.

First launch
- When the OS language is not covered by zh-CN/en-US, the folder screen
  looks up a matching pack once (SuggestLanguagePack) and offers to install
  it; Continue installs and enables it so the UI follows the OS language.
  Before setup the market keeps its index in memory only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 05:17:45 -07:00

552 lines
19 KiB
Go

package plugin
import (
"context"
"encoding/json"
"net/http"
"net/http/httptest"
"os"
"path/filepath"
"strings"
"testing"
"github.com/Nwflower/reims-go/internal/i18n"
)
func TestLocalizedTextExtraLocales(t *testing.T) {
var lt LocalizedText
raw := `{"zh-CN":"日语包","en-US":"Japanese Pack","ja-jp":"日本語パック"}`
if err := json.Unmarshal([]byte(raw), &lt); err != nil {
t.Fatalf("unmarshal: %v", err)
}
if !lt.HasAny() {
t.Fatal("expected HasAny=true")
}
if got := lt.Get("ja-JP"); got != "日本語パック" {
t.Fatalf("Get(ja-JP) = %q, want 日本語パック", got)
}
if got := lt.Get("zh-CN"); got != "日语包" {
t.Fatalf("Get(zh-CN) = %q", got)
}
if got := lt.Get("fr-FR"); got != "Japanese Pack" {
t.Fatalf("Get(fr-FR) fallback = %q, want Japanese Pack", got)
}
}
func TestValidateLocaleContribution(t *testing.T) {
dir := t.TempDir()
locDir := filepath.Join(dir, "locales")
if err := os.MkdirAll(locDir, 0o755); err != nil {
t.Fatal(err)
}
if err := os.WriteFile(filepath.Join(locDir, "ja-JP.json"), []byte(`{"sidebarSettings":"設定"}`), 0o644); err != nil {
t.Fatal(err)
}
okContrib := LocaleContribution{Locale: "ja-JP", Label: "日本語", File: "locales/ja-JP.json"}
if err := ValidateLocaleContribution(okContrib, dir); err != nil {
t.Fatalf("expected valid locale contribution, got: %v", err)
}
if err := ValidateLocaleContribution(LocaleContribution{Locale: "ja-JP"}, dir); err == nil {
t.Fatal("expected error for empty locale contribution")
}
if err := ValidateLocaleContribution(LocaleContribution{Locale: "bad/tag", Messages: map[string]string{"a": "b"}}, dir); err == nil {
t.Fatal("expected error for invalid locale tag")
}
if err := ValidateLocaleContribution(LocaleContribution{Locale: "ja-JP", File: "../secret.json"}, dir); err == nil {
t.Fatal("expected error for path traversal")
}
if err := ValidateLocaleContribution(LocaleContribution{Locale: "ja-JP", File: "locales/ja-JP.txt"}, dir); err == nil {
t.Fatal("expected error for non-.json locale file")
}
}
func TestManagerResolvedLocalePacks(t *testing.T) {
dataRoot := t.TempDir()
devDir := t.TempDir()
if err := os.MkdirAll(filepath.Join(devDir, "locales"), 0o755); err != nil {
t.Fatal(err)
}
if err := os.WriteFile(filepath.Join(devDir, "locales", "ja-JP.json"), []byte(`{"sidebarSettings":"設定","language":"言語"}`), 0o644); err != nil {
t.Fatal(err)
}
if err := os.WriteFile(filepath.Join(devDir, "locales", "ja-JP.backend.json"), []byte(`{"doctor.os":"OS (JP)"}`), 0o644); err != nil {
t.Fatal(err)
}
manifest := `{
"schema": 1,
"id": "community.locale.ja",
"version": "1.0.0",
"name": {"zh-CN": "日语语言包", "en-US": "Japanese Pack", "ja-JP": "日本語パック"},
"description": {"zh-CN": "日语翻译", "en-US": "Japanese translations"},
"contributes": {
"locales": [
{
"locale": "ja_jp",
"label": "日本語",
"fallback": "en-US",
"file": "locales/ja-JP.json",
"backendFile": "locales/ja-JP.backend.json",
"messages": {"themeDark": "ダーク"}
}
]
}
}`
if err := os.WriteFile(filepath.Join(devDir, "plugin.json"), []byte(manifest), 0o644); err != nil {
t.Fatal(err)
}
mgr, err := NewManager(ManagerOptions{DataRoot: dataRoot, HostVersion: "0.2.6"})
if err != nil {
t.Fatalf("NewManager: %v", err)
}
defer mgr.Close()
if _, err := mgr.LinkDev(context.Background(), devDir); err != nil {
t.Fatalf("LinkDev: %v", err)
}
if err := mgr.Enable(context.Background(), "community.locale.ja", false); err != nil {
t.Fatalf("Enable: %v", err)
}
// The GUI switches to this tag after enabling, so it must match the pack's canonical tag.
if info, ok := mgr.Registry().Info("community.locale.ja"); !ok || len(info.Locales) != 1 || info.Locales[0] != "ja-JP" {
t.Fatalf("PluginInfo.Locales = %v, want [ja-JP]", info.Locales)
}
uiPacks, backendPacks := mgr.ResolvedLocalePacks()
if len(uiPacks) != 1 {
t.Fatalf("expected 1 UI locale pack, got %d", len(uiPacks))
}
p := uiPacks[0]
if p.Locale != "ja-JP" || p.Label != "日本語" || p.Fallback != "en-US" {
t.Fatalf("unexpected pack metadata: %+v", p)
}
if p.Messages["sidebarSettings"] != "設定" || p.Messages["themeDark"] != "ダーク" {
t.Fatalf("unexpected merged UI messages: %+v", p.Messages)
}
bp, ok := backendPacks[i18n.Locale("ja-JP")]
if !ok || bp.Messages["doctor.os"] != "OS (JP)" {
t.Fatalf("unexpected backend catalog: %+v", backendPacks)
}
// Disabling the plugin removes the locale pack cleanly.
if err := mgr.Disable(context.Background(), "community.locale.ja"); err != nil {
t.Fatalf("Disable: %v", err)
}
uiPacks, backendPacks = mgr.ResolvedLocalePacks()
if len(uiPacks) != 0 || len(backendPacks) != 0 {
t.Fatalf("expected empty locale packs after disable, got ui=%d backend=%d", len(uiPacks), len(backendPacks))
}
}
func TestDualTrackLocaleV2FontsAndPluginOverrides(t *testing.T) {
dataRoot := t.TempDir()
// 1. Create functional plugin `acme.snap` with private l10n (`locales/en-US.json`, `locales/zh-CN.json`).
funcDir := t.TempDir()
if err := os.MkdirAll(filepath.Join(funcDir, "locales"), 0o755); err != nil {
t.Fatal(err)
}
if err := os.WriteFile(filepath.Join(funcDir, "locales", "en-US.json"), []byte(`{
"status.ok": {"message": "Backed up {count} items", "$comment": "Backup summary"}
}`), 0o644); err != nil {
t.Fatal(err)
}
if err := os.WriteFile(filepath.Join(funcDir, "locales", "zh-CN.json"), []byte(`{
"status.ok": "已备份 {count} 项"
}`), 0o644); err != nil {
t.Fatal(err)
}
funcManifest := `{
"schema": 1,
"id": "acme.snap",
"version": "1.0.0",
"name": {"zh-CN": "快照助手", "en-US": "Snap Helper"},
"description": {"zh-CN": "自动快照", "en-US": "Auto snapshots"},
"l10n": "locales",
"permissions": ["ui:slot"],
"settings": {
"x-scope": "app",
"properties": {
"keep_count": {
"type": "integer",
"title": {"zh-CN": "保留份数", "en-US": "Keep count"},
"default": 5
}
}
},
"contributes": {
"menus": [
{"id": "quick", "slot": "vm.toolbar", "command": "snap.now", "title": {"zh-CN": "立即备份", "en-US": "Backup Now"}}
]
}
}`
if err := os.WriteFile(filepath.Join(funcDir, "plugin.json"), []byte(funcManifest), 0o644); err != nil {
t.Fatal(err)
}
// 2. Create standalone Language Pack `official.lang.ja-jp` with domain files, valid WOFF2 font, and pluginOverrides for `acme.snap`.
langDir := t.TempDir()
if err := os.MkdirAll(filepath.Join(langDir, "locales"), 0o755); err != nil {
t.Fatal(err)
}
if err := os.MkdirAll(filepath.Join(langDir, "fonts"), 0o755); err != nil {
t.Fatal(err)
}
if err := os.WriteFile(filepath.Join(langDir, "locales", "core.json"), []byte(`{"sidebarSettings": "設定"}`), 0o644); err != nil {
t.Fatal(err)
}
if err := os.WriteFile(filepath.Join(langDir, "locales", "native.json"), []byte(`{"tray.quit": "Reims-Go を終了"}`), 0o644); err != nil {
t.Fatal(err)
}
// Write a minimal dummy file starting with valid WOFF2 4-byte magic ("wOF2").
woff2Bytes := append([]byte("wOF2"), make([]byte, 44)...)
if err := os.WriteFile(filepath.Join(langDir, "fonts", "noto-jp-ui.woff2"), woff2Bytes, 0o644); err != nil {
t.Fatal(err)
}
// Also test rejecting bad WOFF2 header.
badFontPath := filepath.Join(langDir, "fonts", "bad.woff2")
if err := os.WriteFile(badFontPath, []byte("OTTO0000"), 0o644); err != nil {
t.Fatal(err)
}
if err := ValidateLocaleContribution(LocaleContribution{
Locale: "ja-JP",
Fonts: []ThemeFont{{Family: "BadFont", File: "fonts/bad.woff2"}},
}, langDir); err == nil {
t.Fatal("expected error for non-wOF2 font magic header")
}
langManifest := `{
"schema": 1,
"id": "official.lang.ja-jp",
"version": "1.0.0",
"name": {"zh-CN": "日语语言包", "en-US": "Japanese Language Pack", "ja-JP": "日本語言語パック"},
"description": {"en-US": "Japanese UI and CLI localization"},
"contributes": {
"locales": [
{
"locale": "ja-JP",
"label": "日本語",
"fallback": "en-US",
"files": {
"core": "locales/core.json",
"native": "locales/native.json"
},
"fonts": [
{"family": "Reims Noto JP", "file": "fonts/noto-jp-ui.woff2", "weight": "400"}
],
"pluginOverrides": {
"acme.snap": {
"manifest": {
"name": "スナップヘルパー",
"description": "自動スナップショット",
"fields": {
"setting.keep_count.title": "保持数",
"menu.quick.title": "今すぐバックアップ"
}
},
"messages": {
"status.ok": "{count} 件をバックアップしました"
}
}
}
}
]
}
}`
if err := os.WriteFile(filepath.Join(langDir, "plugin.json"), []byte(langManifest), 0o644); err != nil {
t.Fatal(err)
}
mgr, err := NewManager(ManagerOptions{DataRoot: dataRoot, HostVersion: "0.2.8"})
if err != nil {
t.Fatalf("NewManager: %v", err)
}
defer mgr.Close()
if _, err := mgr.LinkDev(context.Background(), funcDir); err != nil {
t.Fatalf("LinkDev funcDir: %v", err)
}
if err := mgr.Enable(context.Background(), "acme.snap", false); err != nil {
t.Fatalf("Enable acme.snap: %v", err)
}
if _, err := mgr.LinkDev(context.Background(), langDir); err != nil {
t.Fatalf("LinkDev langDir: %v", err)
}
if err := mgr.Enable(context.Background(), "official.lang.ja-jp", false); err != nil {
t.Fatalf("Enable official.lang.ja-jp: %v", err)
}
uiPacks, backendPacks := mgr.ResolvedLocalePacks()
var jaPack *ResolvedLocalePack
for i := range uiPacks {
if uiPacks[i].Locale == "ja-JP" {
jaPack = &uiPacks[i]
break
}
}
if jaPack == nil {
t.Fatalf("ja-JP pack missing in %+v", uiPacks)
}
if jaPack.Messages["sidebarSettings"] != "設定" {
t.Fatalf("jaPack.Messages[sidebarSettings] = %q, want 設定", jaPack.Messages["sidebarSettings"])
}
if len(jaPack.Fonts) != 1 || jaPack.Fonts[0].Family != "Reims Noto JP" {
t.Fatalf("unexpected jaPack.Fonts: %+v", jaPack.Fonts)
}
if jaPack.PluginMessages["acme.snap"]["status.ok"] != "{count} 件をバックアップしました" {
t.Fatalf("unexpected PluginMessages: %+v", jaPack.PluginMessages)
}
if backendPacks[i18n.Locale("ja-JP")].Messages["tray.quit"] != "Reims-Go を終了" {
t.Fatalf("unexpected backend pack: %+v", backendPacks)
}
// Verify PluginL10nBundle merges acme.snap's own en-US fallback + ja-JP override.
bundle := mgr.PluginL10nBundle("acme.snap", i18n.Locale("ja-JP"))
if bundle["status.ok"] != "{count} 件をバックアップしました" {
t.Fatalf("PluginL10nBundle(ja-JP) = %+v", bundle)
}
// Verify LocalizePluginInfos and LocalizeMenus apply manifest overrides non-destructively.
infos := mgr.LocalizePluginInfos(mgr.Registry().List())
var snapInfo *PluginInfo
for i := range infos {
if infos[i].ID == "acme.snap" {
snapInfo = &infos[i]
break
}
}
if snapInfo == nil || snapInfo.Name.Get("ja-JP") != "スナップヘルパー" {
t.Fatalf("LocalizePluginInfos failed: %+v", snapInfo)
}
if snapInfo.Settings.Properties["keep_count"].Title.Get("ja-JP") != "保持数" {
t.Fatalf("Settings property title override failed: %+v", snapInfo.Settings.Properties["keep_count"])
}
menus := mgr.LocalizeMenus(mgr.Registry().Menus(""))
if len(menus) != 1 || menus[0].Title.Get("ja-JP") != "今すぐバックアップ" {
t.Fatalf("LocalizeMenus failed: %+v", menus)
}
// Verify LoadStaticLocalePacks (< 2ms CLI path) loads native.json without starting Manager.
staticPacks := LoadStaticLocalePacks(dataRoot)
defer i18n.SetPluginCatalogs(nil)
if got := i18n.T(i18n.Locale("ja-JP"), "tray.quit"); got != "Reims-Go を終了" {
t.Fatalf("LoadStaticLocalePacks i18n.T(ja-JP, tray.quit) = %q, staticPacks=%+v", got, staticPacks)
}
}
func TestSecurityAndGhostLocaleRegressions(t *testing.T) {
dataRoot := t.TempDir()
// H-3: A functional plugin shipping locales/de-DE.json (Track B) without contributes.locales (Track A)
// must NOT mark HasUIMessages=true, while still serving its own German L10n bundle.
funcDir := filepath.Join(t.TempDir(), "acme.german-tool")
if err := os.MkdirAll(filepath.Join(funcDir, "locales"), 0o755); err != nil {
t.Fatal(err)
}
manifest := `{
"schema": 1,
"id": "acme.german-tool",
"version": "1.0.0",
"name": {"en-US": "German Tool"},
"description": {"en-US": "Ships plugin-scoped de-DE strings"},
"l10n": "locales"
}`
if err := os.WriteFile(filepath.Join(funcDir, "plugin.json"), []byte(manifest), 0o644); err != nil {
t.Fatal(err)
}
if err := os.WriteFile(filepath.Join(funcDir, "locales", "en-US.json"), []byte(`{"btn.run":"Run"}`), 0o644); err != nil {
t.Fatal(err)
}
if err := os.WriteFile(filepath.Join(funcDir, "locales", "de-DE.json"), []byte(`{"btn.run":"Ausführen"}`), 0o644); err != nil {
t.Fatal(err)
}
// Also prepare an oversized > 2 MiB SVG inside funcDir to verify M-4 AssetServer cap.
bigSVG := `<svg xmlns="http://www.w3.org/2000/svg"><!--` + strings.Repeat("A", (2<<20)+1024) + `--></svg>`
if err := os.WriteFile(filepath.Join(funcDir, "huge.svg"), []byte(bigSVG), 0o644); err != nil {
t.Fatal(err)
}
mgr, err := NewManager(ManagerOptions{DataRoot: dataRoot, HostVersion: "0.2.8"})
if err != nil {
t.Fatalf("NewManager: %v", err)
}
defer mgr.Close()
if _, err := mgr.LinkDev(context.Background(), funcDir); err != nil {
t.Fatalf("LinkDev: %v", err)
}
if err := mgr.Enable(context.Background(), "acme.german-tool", false); err != nil {
t.Fatalf("Enable: %v", err)
}
uiPacks, _ := mgr.ResolvedLocalePacks()
var dePack *ResolvedLocalePack
for i := range uiPacks {
if uiPacks[i].Locale == "de-DE" {
dePack = &uiPacks[i]
break
}
}
if dePack == nil {
t.Fatalf("expected de-DE plugin L10n entry in uiPacks, got %+v", uiPacks)
}
if dePack.HasUIMessages {
t.Fatalf("expected HasUIMessages=false for functional plugin without Track A host UI messages")
}
if got := mgr.PluginL10nBundle("acme.german-tool", i18n.Locale("de-DE"))["btn.run"]; got != "Ausführen" {
t.Fatalf("PluginL10nBundle(de-DE) = %q, want Ausführen", got)
}
// M-2: LinkDev must reject a dev plugin directory with an invalid font magic header.
badDevDir := filepath.Join(t.TempDir(), "bad.font.pack")
if err := os.MkdirAll(filepath.Join(badDevDir, "fonts"), 0o755); err != nil {
t.Fatal(err)
}
badManifest := `{
"schema": 1,
"id": "bad.font.pack",
"version": "1.0.0",
"name": {"en-US": "Bad Font"},
"contributes": {
"locales": [{"locale": "fr-FR", "label": "Français", "fonts": [{"family": "Bad", "file": "fonts/bad.woff2"}]}]
}
}`
if err := os.WriteFile(filepath.Join(badDevDir, "plugin.json"), []byte(badManifest), 0o644); err != nil {
t.Fatal(err)
}
if err := os.WriteFile(filepath.Join(badDevDir, "fonts", "bad.woff2"), []byte("NOT_WOFF2"), 0o644); err != nil {
t.Fatal(err)
}
if _, err := mgr.LinkDev(context.Background(), badDevDir); err == nil {
t.Fatal("expected LinkDev to reject invalid WOFF2 magic header")
}
// M-3: Broker.AllowRate enforces 120 req/s per active plugin.
for i := 0; i < 120; i++ {
if err := mgr.Broker().AllowRate("acme.german-tool"); err != nil {
t.Fatalf("AllowRate call %d failed unexpectedly: %v", i+1, err)
}
}
if err := mgr.Broker().AllowRate("acme.german-tool"); err == nil {
t.Fatal("expected 121st AllowRate call within 1s window to be rate-limited")
}
// M-4: AssetServer rejects > 2 MiB SVG with 413 and path traversal with 400/403.
reqOversized := httptest.NewRequest(http.MethodGet, mgr.Assets().AssetURL("acme.german-tool", "huge.svg"), nil)
recOversized := httptest.NewRecorder()
mgr.Assets().ServeHTTP(recOversized, reqOversized)
if recOversized.Code != http.StatusRequestEntityTooLarge {
t.Fatalf("expected 413 for >2MiB SVG, got %d", recOversized.Code)
}
rawTraversalURL := "/plugin-assets/" + mgr.Assets().Token() + "/acme.german-tool/../secret.txt"
reqTraversal := httptest.NewRequest(http.MethodGet, rawTraversalURL, nil)
recTraversal := httptest.NewRecorder()
mgr.Assets().ServeHTTP(recTraversal, reqTraversal)
if recTraversal.Code != http.StatusBadRequest && recTraversal.Code != http.StatusForbidden {
t.Fatalf("expected 400/403 for traversal, got %d", recTraversal.Code)
}
}
func TestCommunityLocaleTrustBoundaryAndNoInUseWakeup(t *testing.T) {
// 1. LocalizedText.UnmarshalJSON routes aliases ("zh_CN", "en") into ZhCN/EnUS.
var lt LocalizedText
if err := json.Unmarshal([]byte(`{"zh_CN":"简体","en":"English"}`), &lt); err != nil {
t.Fatalf("unmarshal aliases: %v", err)
}
if lt.ZhCN != "简体" || lt.EnUS != "English" {
t.Fatalf("aliases misrouted: %+v", lt)
}
// 2. Community language pack cannot hijack built-in en-US host strings or overwrite
// existing builtin.core en-US metadata, and ResolvedLocalePacks must not trigger inUseChecker.
dataRoot := t.TempDir()
mgr, err := NewManager(ManagerOptions{DataRoot: dataRoot, HostVersion: "0.2.8"})
if err != nil {
t.Fatalf("NewManager: %v", err)
}
defer mgr.Close()
inUseCalled := 0
mgr.Registry().SetInUseChecker(func(pluginID string) (bool, string, error) {
inUseCalled++
return false, "", nil
})
// Register a community plugin directly in the registry with TrustCommunity.
if err := mgr.Registry().Register(PluginDef{
Source: SourceLocal,
Trust: TrustCommunity,
Desired: true,
Manifest: Manifest{
Schema: 1,
ID: "community.lang.hijack",
Version: "1.0.0",
Name: LocalizedText{EnUS: "Community Pack"},
Contributes: Contributes{
Locales: []LocaleContribution{
{
Locale: "en-US",
Label: "Hijacked EN",
Messages: map[string]string{"sidebarSettings": "PWNED"},
Backend: map[string]string{"tray.quit": "PWNED"},
PluginOverrides: map[string]PluginLocaleOverride{
"builtin.core": {
Manifest: &PluginManifestOverride{Name: "PWNED CORE"},
},
},
},
{
Locale: "fr-FR",
Label: "Français",
Messages: map[string]string{"sidebarSettings": "Paramètres"},
PluginOverrides: map[string]PluginLocaleOverride{
"builtin.core": {
Manifest: &PluginManifestOverride{Name: "Noyau"},
},
},
},
},
},
},
}); err != nil {
t.Fatalf("register community pack: %v", err)
}
mgr.Registry().Reconcile(context.Background())
uiPacks, backendPacks := mgr.ResolvedLocalePacks()
if inUseCalled != 0 {
t.Fatalf("ResolvedLocalePacks triggered inUseChecker %d times (want 0)", inUseCalled)
}
if err := mgr.Broker().AllowRate("community.lang.hijack"); err != nil {
t.Fatalf("AllowRate failed: %v", err)
}
if inUseCalled != 0 {
t.Fatalf("Broker.AllowRate triggered inUseChecker %d times (want 0)", inUseCalled)
}
if _, hijacked := backendPacks[i18n.EnUS]; hijacked {
t.Fatalf("community pack hijacked built-in en-US backend catalog: %+v", backendPacks)
}
for _, p := range uiPacks {
if p.Locale == "en-US" && p.Messages["sidebarSettings"] == "PWNED" {
t.Fatalf("community pack hijacked built-in en-US UI catalog: %+v", p)
}
}
// Community override may fill missing fr-FR on builtin.core, but not overwrite en-US.
localized := mgr.LocalizePluginInfos([]PluginInfo{{
ID: "builtin.core",
Name: LocalizedText{EnUS: "Reims Core", ZhCN: "Reims 核心"},
}})
if localized[0].Name.EnUS != "Reims Core" {
t.Fatalf("community pack overwrote builtin.core en-US name: %q", localized[0].Name.EnUS)
}
if localized[0].Name.Get("fr-FR") != "Noyau" {
t.Fatalf("community pack failed to fill missing fr-FR name: %+v", localized[0].Name)
}
}