Fair enough. The following refers to double quotes, but single quotes are indeed better.
--
The thought occured to me that if I made a copy of the modx folder, ran a replace job to make every the $_lang[ start on a new line, then ran a find job to find those lines, then took that output and ran it through some regexp replaces to strip out other code, standardised the $lang references on double quotes, and then sorted it alphabetically keeping unique lines only, and did something similar with the language file, I would end up with two lists of $lang references which I could run a file comparison on.
So I did.
I now know there are 123 lang references in the English file that are not in the site.
This process also revealed a number of missing lang references in the site - I’m not sure how many are a problem because I counted the modules and I’d have to cross reference their own lang files.
I did find a few places where the code and the lang file use slightly different names! This needs fixing. I would err on the side of making life easier for our international friends, and thus suggest changing the site code to use the language name.
Places where the lang file and the code use slightly different names:
List has access_permissions_user
s_message, site code has access_permissions_user_message.
Needs fixing in
manager\actions\mutate_user.dynamic.php (924)
manager\actions\mutate_web_user.dynamic.php (763)
List has files_upload_copyfailed, site has files_upload_copy_failed
Needs fixing in
manager\actions\files.dynamic.php (173)
May be a similar story with these two, haven’t had time to check:
List: "document_opt", site: "document_opt_hide_menu"
List: "tree", site: "tree_title"
That leaves the following lang file definitions that aren’t used (they may be double or single quote in the actual file).
$_lang["about"]
$_lang["action_parser"]
$_lang["add"]
$_lang["administration"]
$_lang["advanced"]
$_lang["alert"]
$_lang["back"]
$_lang["back_title"]
$_lang["basic"]
$_lang["clickonsection"]
$_lang["clicktopin"]
$_lang["clicktounpin"]
$_lang["confirm_preview"]
$_lang["content"]
$_lang["credits_adodb"]
$_lang["credits_htmlarea"]
$_lang["custom"]
$_lang["days"]
$_lang["default"]
$_lang["deleted"]
$_lang["deleted_document"]
$_lang["deleted_folder"]
$_lang["deleted_in_recycle_bin"]
$_lang["deleted_in_tree"]
$_lang["deleted_weblink"]
$_lang["deleted_weblink_folder"]
$_lang["documents"]
$_lang["document_identification"]
$_lang["document_tree"]
$_lang["edit_htmlsnippet"]
$_lang["edit_module"]
$_lang["edit_parser"]
$_lang["edit_parser_title"]
$_lang["edit_parser_warning"]
$_lang["edit_plugin"]
$_lang["edit_role"]
$_lang["edit_snippet"]
$_lang["edit_template"]
$_lang["edit_tmplvars"]
$_lang["edit_user"]
$_lang["enabledebug_message"]
$_lang["enabledebug_title"]
$_lang["files_file_upload"]
$_lang["find_in_tree"]
$_lang["forward"]
$_lang["graphtype_message"]
$_lang["graphtype_title"]
$_lang["htmlsnippet_locked_message"]
$_lang["internal_referer"]
$_lang["layout_message"]
$_lang["layout_settings_1"]
$_lang["layout_settings_2"]
$_lang["layout_settings_3"]
$_lang["layout_settings_4"]
$_lang["layout_settings_5"]
$_lang["layout_settings_title"]
$_lang["layout_title"]
$_lang["loading_menu_tree"]
$_lang["lock_htmlsnippet_msg"]
$_lang["logout_message"]
$_lang["menu"]
$_lang["menutype_message"]
$_lang["menutype_title"]
$_lang["messages_category"]
$_lang["modules_already_installed"]
$_lang["modules_install_new"]
$_lang["module_depend_msg"]
$_lang["module_install_info"]
$_lang["months"]
$_lang["my_account"]
$_lang["my_preferences"]
$_lang["nojava"]
$_lang["no_date"]
$_lang["no_logging_found"]
$_lang["online"]
$_lang["openurl"]
$_lang["openurl_message"]
$_lang["parser_not_writable"]
$_lang["published_document"]
$_lang["published_folder"]
$_lang["published_weblink"]
$_lang["published_weblink_folder"]
$_lang["rank"]
$_lang["rebuild"]
$_lang["recycle_bin"]
$_lang["recycle_bin_empty"]
$_lang["regular"]
$_lang["reload"]
$_lang["reload_title"]
$_lang["restore_tree"]
$_lang["role_edit_parser"]
$_lang["role_save_parser"]
$_lang["settings_editor"]
$_lang["settings_keywords"]
$_lang["settings_reports"]
$_lang["settings_server"]
$_lang["showgraphs_message"]
$_lang["showgraphs_title"]
$_lang["showtestpage_message"]
$_lang["showtestpage_title"]
$_lang["site_parser"]
$_lang["sort_by"]
$_lang["sort_dir"]
$_lang["standard"]
$_lang["stats_daily_breakup"]
$_lang["stats_hourly_breakup"]
$_lang["stats_monthly_breakup"]
$_lang["stats_title"]
$_lang["stats_top_entrypages"]
$_lang["stats_top_hosts"]
$_lang["stats_top_os"]
$_lang["stats_top_pages"]
$_lang["stats_top_referrers"]
$_lang["stats_top_ua"]
$_lang["test_page"]
$_lang["unknown_referer"]
$_lang["unpublished_document"]
$_lang["unpublished_folder"]
$_lang["unpublished_weblink"]
$_lang["unpublished_weblink_folder"]
$_lang["visitors_came_from_here"]
$_lang["visitors_used_this"]
$_lang["visits_started_here"]
If anyone knows of a reason any of those lines shouldn’t be removed, please say so.
Also: There’s a bunch of credits commented as "obsolete" but which are used in help.static.php - and thus not on this list. Is the "obsolete" wrong?