Skip to content

Lan files to use array style#5677

Open
tgtje wants to merge 17 commits into
e107inc:masterfrom
tgtje:master
Open

Lan files to use array style#5677
tgtje wants to merge 17 commits into
e107inc:masterfrom
tgtje:master

Conversation

@tgtje
Copy link
Copy Markdown
Contributor

@tgtje tgtje commented May 26, 2026

Why

last remainging php files in array style

What Changed

define to array

How It Was Tested

fresh git installs with and without locale packs (full array and define mode)->

Backwards Compatibility

No BC impact noticed.

AI Model (Optional)

Checklist

  • One issue per PR: the diff is scoped to this change only
  • Commit messages explain why, not just what
  • New or changed behavior has test coverage (or explain why not)
  • No unrelated reformatting, renames, or import reordering

tgtje added 8 commits May 26, 2026 15:50
lan file define to array
lan file define to array
lan file define to array
lan file define to array
lan file define to array
lan file define to array
lan file define to array
lan file define to array
@tgtje
Copy link
Copy Markdown
Contributor Author

tgtje commented May 26, 2026

All proposed and found errors resolved

Copy link
Copy Markdown
Contributor

@e107help e107help Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tgtje, the three parse errors from the earlier review are all fixed, and every file passes php -l now. Nice one. :-)

The formatting still doesn't quite match what the rest of the codebase uses for array-style LAN files. Two things to look at:

  1. return[ needs a space: return [
  2. Each array entry should be indented by 4 spaces

For comparison, here's what the existing files look like (e.g. e107_plugins/banner/languages/English_global.php):

return [
    'LAN_PLUGIN_BANNER_NAME' => "Banners",
    'LAN_PLUGIN_BANNER_DESCRIPTION' => "Add advertising banners to your e107 website",
];

Also, comment_menu/languages/English.php is missing the space before => ('CM_L1'=> vs 'CM_L1' => in the other files).

I know reformatting 13 files through the web editor is tedious. @kreossino shared a formatting script over on #5676 that might help if you can run PHP locally.

Comment thread e107_plugins/comment_menu/languages/English.php Outdated
Comment thread e107_plugins/forum/languages/English/English_admin.php Outdated
tgtje added 9 commits May 27, 2026 18:48
define to array
define to array
define to array
define to array
define to array
define to array
define to lan
define to array
define to array
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant