Uh oh!
There was an error while loading. Please reload this page.
Fix MediaBrowser i18n review findings (follow-up to #529) - #532
Merged
Conversation
added 3 commits
May 11, 2026 11:32
All user-facing strings in the media browser (buttons, titles, tooltips, placeholders, empty states, flash notifications, and confirm dialogs) are now routed through gettext/ngettext. Russian and Estonian translations filled in (3-form and 2-form plurals respectively).
List-view dropdown duplicates of the folder menu (Color heading, delete
data-confirm, Delete button) were missed in the original sweep — wrap
them so list view matches grid view.
Three flash/confirm messages embedded two independent counts in a single
gettext call, which made correct pluralization impossible in Russian
(3 forms) and Estonian (2 forms). Each is now composed from two ngettext
calls injected into the surrounding gettext template:
- build_partial_success_message: uploaded/failed counts
- build_new_and_duplicates_message: added/duplicate counts
- delete_selected_confirm (files+folders branch): files/folders counts
Russian translation for "%{count} selected" used the masculine predicate
"%{count} выбран", which is wrong for folders (feminine). Switched to
the gender-neutral "Выбрано: %{count}" across all plural forms.
Wrap the "FILE" fallback for unknown file_type so the viewer label is
localized along with the rest of the metadata pane.…8n-followup # Conflicts: # lib/phoenix_kit_web/components/media_browser.ex # priv/gettext/de/LC_MESSAGES/default.po # priv/gettext/default.pot # priv/gettext/en/LC_MESSAGES/default.po # priv/gettext/es/LC_MESSAGES/default.po # priv/gettext/et/LC_MESSAGES/default.po # priv/gettext/fr/LC_MESSAGES/default.po # priv/gettext/it/LC_MESSAGES/default.po # priv/gettext/pl/LC_MESSAGES/default.po # priv/gettext/ru/LC_MESSAGES/default.po
timujinne added a commit
to timujinne/phoenix_kit
that referenced
this pull request
May 11, 2026
…iaBrowser i18n followup)
timujinne added a commit
to timujinne/phoenix_kit
that referenced
this pull request
May 11, 2026
Brings main up to date with dev (102 commits) including: - PR BeamLabEU#529 sidebar i18n (merged via upstream) - PR BeamLabEU#532 MediaBrowser i18n followup (merged via upstream) - fix/orphan-query-publishing-versions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to PR #529, addressing review findings on the cherry-picked MediaBrowser i18n commit.
Major fixes
1. List-view dropdown was not wrapped
The folder context-menu items are duplicated between grid view and list view. Grid view (
media_browser.html.heex:735, 766, 769) was wrapped in the original commit; list view at:1047, 1078, 1081was missed. Now both views show the same translations.2. Composed ngettext for messages with two independent counts
Three messages embedded two counts in a single
gettextcall (%{new} file(s) uploaded, %{err} failed), which forced the translator to write awkwardфайл(ов)constructions and made correct Russian/Estonian pluralization impossible.Each is now composed:
Applied to
media_browser.ex:1743(build_partial_success_message),:1770(build_new_and_duplicates_message), and:1879(delete_selected_confirm, files+folders branch).Minor fixes
%{count} selected(ru):"%{count} выбран"implied masculine gender, which was wrong when selecting folders (feminine). Switched to the gender-neutral predicative"Выбрано: %{count}"for all 3 plural forms. Estonian gets the analogous"Valitud: %{count}".String.upcase(f.file_type || "FILE")— fallback"FILE"now goes throughgettextso the viewer's type badge is localized for unknown file types.Translation coverage
priv/gettext/default.potviamix gettext.extract..pofiles re-merged.ngettext/gettextentries; previous fuzzy markers cleared.