Skip to content

[3.0] Use the keys these language lookups meant - #9399

Merged
Sesquipedalian merged 1 commit into
SimpleMachines:release-3.0from
albertlast:3.0/lang-key-names
Aug 14, 2026
Merged

[3.0] Use the keys these language lookups meant#9399
Sesquipedalian merged 1 commit into
SimpleMachines:release-3.0from
albertlast:3.0/lang-key-names

Conversation

@albertlast

Copy link
Copy Markdown
Collaborator

Description

Four lookups name a key that no language file defines, so Lang::getTxt() returns an empty string.

The theme file browser has no size column

Sources/Actions/Admin/Themes.php asks for size_kilobytes and size_bytes. Everywhere else in SMF — Attachment.php, Feed.php, Actions/Admin/Search.php, ManageAttachments.template.php, and about a dozen more — the keys are singular: size_kilobyte and size_byte. So Admin → Themes → Modify → browse files showed nothing in the size column, for every file. Straight off the running forum:

before                                       after
<td class="righttext"></td>                  <td class="righttext">242 B</td>
<td class="righttext"></td>                  <td class="righttext">32.76 KB</td>

The arguments needed a second look too. Both went through Lang::numberFormat() first, which hands an already formatted string like 32.76 to a {0, number} placeholder. The other callers pass the number and let the string format it, so that is what these do now.

The installer's FTP log says nothing

Sources/Maintenance/Tools/ToolsBase.php reports whether a chmod through FTP worked with getTxt('done') and getTxt('failed'). Languages/en_US/Maintenance.php calls those log_done ('done.') and log_failed ('failed.'), and has since the file was written. I have not staged a failing FTP chmod to watch it, so this one is by inspection.

One I left alone

Themes/default/ReportedContent.template.php asks for mc_recent_member_reports, which is also undefined, in template_reported_members_block(). That function is dead: the moderation home registers reported_users_block, which ModerationCenter.template.php provides, and ReportedContent.template.php also carries a second template_reported_posts_block() that duplicates the one in ModerationCenter.template.php. Deleting dead template functions is a bigger call than this PR, so it is only flagged here.

Found while splitting #7933, with the same sweep as #9397 (which fixes calls that name the wrong language file) and #9398 (which fixes fallbacks that cannot fire). Not part of the theme, so it goes straight to release-3.0.

Issues References (Fixes|Related|Closes)

Related to #7933

Four lookups name a key no language file defines, so getTxt() returns an
empty string.

The theme file browser asks for size_kilobytes and size_bytes. Everywhere
else in SMF the keys are singular, size_kilobyte and size_byte, so the size
column in Admin -> Themes -> Modify -> browse files was blank for every
file. The arguments went through Lang::numberFormat() first as well, which
hands an already formatted string to a {0, number} placeholder; the other
callers pass the number and let the string format it.

The installer and upgrader ask for done and failed while reporting whether
chmod through FTP worked. Maintenance.php calls those log_done and
log_failed.

Signed-off-by: Mathias Papenbrock <mathiaspapealbert@hotmail.com>
Signed-off-by: albertlast <mathiaspapealbert@hotmail.com>
@jdarwood007 jdarwood007 added the Localization Language & internationalization label Aug 8, 2026
@jdarwood007 jdarwood007 added this to the 3.0 Alpha 6 milestone Aug 8, 2026
@Sesquipedalian
Sesquipedalian merged commit 4878238 into SimpleMachines:release-3.0 Aug 14, 2026
4 checks passed
@jdarwood007 jdarwood007 modified the milestones: 3.0 Alpha 6, 3.0 Alpha 5 Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Localization Language & internationalization

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants