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

[4.0] [Multilingual Status module] Adding displaying a possible error if URL Language Code is empty #30537

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ public static function getContentlangs()
[
$db->quoteName('lang_code'),
$db->quoteName('published'),
$db->quoteName('sef'),
]
)
->from($db->quoteName('#__languages'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,13 @@
<?php echo Text::sprintf('COM_LANGUAGES_MULTILANGSTATUS_CONTENT_LANGUAGE_TRASHED', $contentlang->lang_code); ?>
</div>
<?php endif; ?>
<?php if (empty($contentlang->sef)) : ?>
<div class="alert alert-error">
<span class="fas fa-exclamation" aria-hidden="true"></span>
<span class="sr-only"><?php echo Text::_('ERROR'); ?></span>
<?php echo Text::sprintf('COM_LANGUAGES_MULTILANGSTATUS_CONTENT_LANGUAGE_SEF_MISSING', $contentlang->lang_code); ?>
</div>
<?php endif; ?>
<?php endforeach; ?>
<?php if ($this->listUsersError) : ?>
<div class="alert alert-warning">
Expand Down
1 change: 1 addition & 0 deletions administrator/language/en-GB/com_languages.ini
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ COM_LANGUAGES_MULTILANGSTATUS_CONTACTS_ERROR_TIP="Warning! A user/author should
COM_LANGUAGES_MULTILANGSTATUS_CONTENT_LANGUAGE_HOME_UNPUBLISHED="Both the <strong>%s</strong> Content Language and its Home page are unpublished. <strong>The language will not display on the site.</strong>"
COM_LANGUAGES_MULTILANGSTATUS_CONTENT_LANGUAGE_MISSING="The <strong>%s</strong> Content Language has been deleted although the corresponding Site Language is enabled and a Home page is assigned to this language. <strong>The language will not display on the site.</strong>"
COM_LANGUAGES_MULTILANGSTATUS_CONTENT_LANGUAGE_PUBLISHED="Published Content Languages"
COM_LANGUAGES_MULTILANGSTATUS_CONTENT_LANGUAGE_SEF_MISSING="The \"URL Language Code\" is missing for the <strong>%s</strong> Content Language. <strong>If not corrected, the multilingual feature may not function properly or the site may not be reachable!</strong>"
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we really need to put the entire second sentence inside strong. It's inside a big red error message so that should be enough emphasis

Copy link
Member Author

@infograf768 infograf768 Sep 1, 2020

Choose a reason for hiding this comment

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

We already use this phrasing in another string

COM_LANGUAGES_MULTILANGSTATUS_ERROR_DEFAULT_CONTENT_LANGUAGE="The Content Language for the <strong>%s</strong> default Site Language is unpublished or does not exist. <strong>If not corrected, the multilingual feature may not function properly or the site may not be reachable!</strong>"

It is also useful in this precise case.

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe omit If not corrected. See line 66 as an example.

Copy link
Member Author

Choose a reason for hiding this comment

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

Modified both strings taking off If not corrected,

COM_LANGUAGES_MULTILANGSTATUS_CONTENT_LANGUAGE_TRASHED="The <strong>%s</strong> Content Language is trashed. <strong>The language will not display on the site.</strong>"
COM_LANGUAGES_MULTILANGSTATUS_DEFAULT_HOME_MODULE_PUBLISHED="The menu module displaying the Home menu item set to language &quot;All&quot; should not be published."
COM_LANGUAGES_MULTILANGSTATUS_ERROR_CONTENT_LANGUAGE="A Default Home page is assigned to the <strong>%s</strong> Content Language although a Site Language for this Content Language is not installed or enabled AND/OR the Content Language is not published. <strong>The language will not display on the site.</strong>"
Expand Down