Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Language: Use parent ISO code + self ID for new sub languages #6016

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

AngelFQC
Copy link
Member

@AngelFQC AngelFQC commented Jan 7, 2025

refs BTT#21568

if ($sub_language_id_exist) {
$language_name = SubLanguageManager::get_name_of_language_by_id($_GET['sub_language_id']);
$sub_language_id = $request->query->getInt('sub_language_id');
if (!SubLanguageManager::languageExistsById($parent_id)) {
Copy link

Choose a reason for hiding this comment

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

Variable "parent_id" is not in valid camel caps format

$language_name = $language_details['original_name'];
$parent_id = $request->query->getInt('id');
}
$language_details = SubLanguageManager::get_all_information_of_language($parent_id);
Copy link

Choose a reason for hiding this comment

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

Variable "language_details" is not in valid camel caps format

$language_name = $language_details['original_name'];
$parent_id = $request->query->getInt('id');
}
$language_details = SubLanguageManager::get_all_information_of_language($parent_id);
Copy link

Choose a reason for hiding this comment

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

Variable "parent_id" is not in valid camel caps format

'sub_language_add.php?id='.Security::remove_XSS($_GET['id']).'&action=definenewsublanguage'
);
$form->addHeader(
get_lang('Create sub-languageForLanguage').' ( '.strtolower($language_name).' )'
Copy link

Choose a reason for hiding this comment

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

Variable "language_name" is not in valid camel caps format

$original_name = $request->request->get('original_name');
$english_name = str_replace(' ', '_', $request->request->get('english_name'));
$isocode = str_replace(' ', '_', $request->request->get('isocode'));
$check_information = SubLanguageManager::checkIfLanguageExists(
Copy link

Choose a reason for hiding this comment

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

Variable "check_information" is not in valid camel caps format

@AngelFQC AngelFQC marked this pull request as ready for review January 8, 2025 23:36
);
}
if (strlen($values['original_name']) > 0 && strlen($values['english_name']) > 0 && strlen($values['isocode']) > 0) {
if ($allow_insert_info) {
Copy link

Choose a reason for hiding this comment

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

Variable "allow_insert_info" is not in valid camel caps format

$values['english_name'],
$values['sub_language_is_visible'] ?? false,
$parent_id,
$language_details['isocode']
Copy link

Choose a reason for hiding this comment

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

Variable "language_details" is not in valid camel caps format

.$values['english_name'].'<br/>'.get_lang('Character set').' : '.$newSubLanguage->getIsocode();

Display::addFlash(
Display::return_message(get_lang('The new sub-language has been added').$str_info, 'normal', false)
Copy link

Choose a reason for hiding this comment

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

Variable "str_info" is not in valid camel caps format

$content .= $form->returnForm();
}
if ('definenewsublanguage' == $requestAction) {
} elseif (true === SubLanguageManager::isParentOfSubLanguage($parent_id)
Copy link

Choose a reason for hiding this comment

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

Variable "parent_id" is not in valid camel caps format

) {
$sub_language_id = $request->query->getInt('sub_language_id');

if (!SubLanguageManager::languageExistsById($sub_language_id)) {
Copy link

Choose a reason for hiding this comment

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

Variable "sub_language_id" is not in valid camel caps format

Copy link

codeclimate bot commented Jan 8, 2025

Code Climate has analyzed commit 3e39091 and detected 37 issues on this pull request.

Here's the issue category breakdown:

Category Count
Style 36
Clarity 1

View more on Code Climate.

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