Skip to content

Conversation

@mambax7
Copy link
Collaborator

@mambax7 mambax7 commented Oct 23, 2025

No description provided.

@mambax7 mambax7 requested a review from Copilot October 23, 2025 02:52
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR removes hardcoded language constants from the installation database setup by introducing translatable constants in the language file. The hardcoded English strings for website configuration (name, slogan, meta keywords, footer, copyright, description, and censor replacement text) are moved to language-specific constants, making the installation system more internationalization-friendly.

Key Changes

  • Added seven new language constants (_WEBSITE_NAME, _WEBSITE_SLOGAN, _WEBSITE_META_KEYWORDS, _WEBSITE_FOOTER, _WEBSITE_COPYRIGHT, _WEBSITE_DESCRIPTION, _WEBSITE_CENSOR_REPLACE) to the English install language file
  • Replaced hardcoded strings in database insertion statements with references to these new constants
  • Updated documentation to reflect the new language constants

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
htdocs/install/language/english/install.php Defines new translatable constants for website configuration values
htdocs/install/include/makedata.php Replaces hardcoded English strings with language constant references in database insertions
docs/lang_diff.txt Documents the addition of new language constants for version tracking

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

define('IS_VALOR', ' => ');
// website name and slogan
define('_WEBSITE_NAME', 'XOOPS Site');
define('_WEBSITE_SLOGAN', 'Just use it!');
Copy link

Copilot AI Oct 23, 2025

Choose a reason for hiding this comment

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

Inconsistent capitalization in slogan. Changed from 'Just Use it!' to 'Just use it!' - should match the original 'Just Use it!' for consistency.

Suggested change
define('_WEBSITE_SLOGAN', 'Just use it!');
define('_WEBSITE_SLOGAN', 'Just Use it!');

Copilot uses AI. Check for mistakes.
],
)) . "', '_MD_AM_CENSORWRDDSC', 'textarea', 'array', 1)");
$dbm->insert('config', " VALUES (42, 0, 4, 'censor_replace', '_MD_AM_CENSORRPLC', '#OOPS#', '_MD_AM_CENSORRPLCDSC', 'textbox', 'text', 2)");
$dbm->insert('config', " VALUES (42, 0, 4, 'censor_replace', '_MD_AM_CENSORRPLC', '" . _WEBSITE_CENSOR_REPLACE . "', '_MD_AM_CENSORRPLCDSC', 'textbox', 'text', 2)");
Copy link

Copilot AI Oct 23, 2025

Choose a reason for hiding this comment

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

The censor replacement text changed from '#OOPS#' (with hash symbols) to 'OOPS' (without hash symbols). This alters the replacement behavior and may break existing functionality that expects the hash symbols.

Suggested change
$dbm->insert('config', " VALUES (42, 0, 4, 'censor_replace', '_MD_AM_CENSORRPLC', '" . _WEBSITE_CENSOR_REPLACE . "', '_MD_AM_CENSORRPLCDSC', 'textbox', 'text', 2)");
$dbm->insert('config', " VALUES (42, 0, 4, 'censor_replace', '_MD_AM_CENSORRPLC', '#OOPS#', '_MD_AM_CENSORRPLCDSC', 'textbox', 'text', 2)");

Copilot uses AI. Check for mistakes.
/htdocs/class/xoopseditor/tinymce5/language/english.php
define('_XOOPS_EDITOR_TINYMCE_LANGUAGE5', 'en');
define('_XOOPS_EDITOR_TINYMCE5_LANGUAGE', 'en');
- ranamed _XOOPS_EDITOR_TINYMCE_LANGUAGE5 to _XOOPS_EDITOR_TINYMCE5_LANGUAGE
Copy link

Copilot AI Oct 23, 2025

Choose a reason for hiding this comment

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

Corrected spelling of 'ranamed' to 'renamed'.

Suggested change
- ranamed _XOOPS_EDITOR_TINYMCE_LANGUAGE5 to _XOOPS_EDITOR_TINYMCE5_LANGUAGE
- renamed _XOOPS_EDITOR_TINYMCE_LANGUAGE5 to _XOOPS_EDITOR_TINYMCE5_LANGUAGE

Copilot uses AI. Check for mistakes.
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