Skip to content

[Bug] messages_zh.yml / messages_nl.yml duplicate keys and structural defects #80

Description

@wangzhizhou

Bug description

Several defects in the bundled messages_zh.yml and messages_nl.yml files make parts of the shop UI render with English fallback text (or empty), and log a startup warning.

  1. Duplicate shop.common keys — both files define shop: twice; SnakeYAML (Bukkit's default) keeps only the last block, so the first 8 keys (buy-line, sell-line, shift-click-line, cannot-sell-line, buy-only-shift-line, spawner-display-name, item-display-name, menu.fill-display-name) are silently lost, and the server logs [WARN]: duplicate keys found : common.
  2. shop.shop.rotations double nesting — daily-special texts live under shop.shop.rotations.* instead of shop.rotations.*, so the rotation system never resolves them.
  3. shop.stock.gui.see-all.lore is a liststock-gui.yml references see-all.lore.line1 / see-all.lore.line2 via {translate:...} macros, which a list-typed value cannot satisfy.
  4. messages_nl.yml missing live stock-GUI keysshop.stock.gui.filters.*, shop.stock.gui.pagination.*, and shop.stock.gui.localization.item-price-format / item-blocked / item-frozen / no-items are absent (present only under all-stocks), so those spots render empty in Dutch.

Fix

Branch fix/messages-files on fork OrzMC/EzShops:

  • Merges the duplicated shop.common blocks to a single one (text unchanged).
  • Un-nests shop.shop.rotations to shop.rotations (zh and nl).
  • Converts see-all.lore from a list to a line1 / line2 map (zh and nl).
  • Adds the missing shop.stock.gui keys to nl.
  • Adds a regression test MessageFilesDuplicateKeyTest that parses all four messages_*.yml files in strict mode (allowDuplicateKeys = false), so CI catches any future duplicate keys.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions