Menu

A technical check for your locale files: placeholders, tags and missing keys
📰

A technical check for your locale files: placeholders, tags and missing keys

DEV Community: rails·Martin Pisacreta·about 8 hours ago
#pC3nvwa9
#devtorails#devto#dev#file#translation
Long article (338 words) — no AI summary yet.
Reading 0:00
15s threshold

Translation files break in quiet ways. A %{count} turns into %{cuenta} , an <a> tag loses its closing half, a key exists in English but not in Portuguese, or a string was copied over and never translated. The app still boots, the tests still pass, and a user sees a raw placeholder in the middle of a button.

I spent the last week contributing to the open source translations of TRMNL (usetrmnl/trmnl-i18n). Four of those pull requests were merged:

#457 : 571 pt-BR plugin strings.

#458 : an RSpec check that every translation keeps the same interpolation variables as English.

#463 : 318 es-ES plugin strings that were still in English.

#467 : 643 pt-BR strings for the web app (devices, playlists, plugin settings).

A fifth one, #466 , was a two-line fix by the same check: the Japanese "account linked" message had dropped %{plugin_name} .

What the check covers

You send one locale file (YAML or JSON, Rails i18n or similar) plus the source language file.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.