Skip to content
Snippets Groups Projects
Verified Commit a28c9b38 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3164699 by jungle, ravi.shankar, andregp, kishor_kolekar, sulfikar_s,...

Issue #3164699 by jungle, ravi.shankar, andregp, kishor_kolekar, sulfikar_s, ankithashetty, paulocs, Abhijith S, WagnerMelo, quietone: Fix or ignore 15 words used in Help Topics
parent 1f9f1da2
Branches
Tags
37 merge requests!12227Issue #3181946 by jonmcl, mglaman,!7471uncessary 5 files are moved from media-library folder to misc folder,!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!54479.5.x SF update,!5014Issue #3071143: Table Render Array Example Is Incorrect,!4868Issue #1428520: Improve menu parent link selection,!4289Issue #1344552 by marcingy, Niklas Fiekas, Ravi.J, aleevas, Eduardo Morales...,!4114Issue #2707291: Disable body-level scrolling when a dialog is open as a modal,!3630Issue #2815301 by Chi, DanielVeza, kostyashupenko, smustgrave: Allow to create...,!3291Issue #3336463: Rewrite rules for gzipped CSS and JavaScript aggregates never match,!3143Issue #3313342: [PHP 8.1] Deprecated function: strpos(): Passing null to parameter #1 LayoutBuilderUiCacheContext.php on line 28,!3102Issue #3164428 by DonAtt, longwave, sahil.goyal, Anchal_gupta, alexpott: Use...,!2853#3274419 Makes BaseFieldOverride inherit the internal property from the base field.,!2719Issue #3110137: Remove Classy from core.,!2437Issue #3238257 by hooroomoo, Wim Leers: Fragment link pointing to <textarea>...,!2378Issue #2875033: Optimize joins and table selection in SQL entity query implementation,!2074Issue #2707689: NodeForm::actions() checks for delete access on new entities,!2062Issue #3246454: Add weekly granularity to views date sort,!1591Issue #3199697: Add JSON:API Translation experimental module,!1484Exposed filters get values from URL when Ajax is on,!1255Issue #3238922: Refactor (if feasible) uses of the jQuery serialize function to use vanillaJS,!1254Issue #3238915: Refactor (if feasible) uses of the jQuery ready function to use VanillaJS,!1162Issue #3100350: Unable to save '/' root path alias,!1073issue #3191727: Focus states on mobile second level navigation items fixed,!10223132456: Fix issue where views instances are emptied before an ajax request is complete,!957Added throwing of InvalidPluginDefinitionException from getDefinition().,!925Issue #2339235: Remove taxonomy hard dependency on node module,!877Issue #2708101: Default value for link text is not saved,!873Issue #2875228: Site install not using batch API service,!872Draft: Issue #3221319: Race condition when creating menu links and editing content deletes menu links,!844Resolve #3036010 "Updaters",!712Issue #2909128: Autocomplete intermittent on Chrome Android,!579Issue #2230909: Simple decimals fail to pass validation,!560Move callback classRemove outside of the loop,!555Issue #3202493,!485Sets the autocomplete attribute for username/password input field on login form.,!30Issue #3182188: Updates composer usage to point at ./vendor/bin/composer
......@@ -31,8 +31,6 @@ andif
annot
anonyme
anothermodule
anotherwordenglish
anotherwordgerman
antilop
anyall
applix
......@@ -49,7 +47,6 @@ arrowstop
arrowthick
arrowthickstop
arrr
asdrsad
assertable
asterix
atsign
......@@ -94,7 +91,6 @@ bangpow
barbar
barchart
barfoo
barmm
barqux
bartik
bartik's
......@@ -504,7 +500,6 @@ foobarbaz
foobargorilla
foobars
foofoo
foomm
foos
formatless
formattable
......@@ -575,7 +570,6 @@ heure
heures
hexcode
hidpi
hilfetestmodul
hilited
hinode
hippopotamidae
......@@ -899,15 +893,11 @@ nonconfigurable
nonexistingfilename
nonoptional
nonspacing
nonwordgerman
nonworditem
noquotes
noschema
nosniff
nostart
notag
notawordenglish
notawordgerman
notexisting
nothere
notnull
......@@ -1176,7 +1166,6 @@ scorewords
screenreaders
scriptable
scrollbars
sdeeeee
searchdirs
searchfield
sebe
......@@ -1233,7 +1222,6 @@ splitbuttons
spreadsheetml
sqlpassword
sqlusername
sqruct
squaresmall
squiz
squizlabs
......@@ -1582,7 +1570,6 @@ vxezb
vxfbk
waitfor
wcprops
wcsrefsdf
webassert
webcal
webdriver
......@@ -1664,5 +1651,4 @@ zzgroup
åwesome
èxample
über
übersetzung
ȅchȏ
......@@ -7,5 +7,5 @@ related:
---
{% set help_topic_link = render_var(help_topic_link('help_topics_test.test_urls')) %}
<p>{% trans %}This is a test. It should link to the URL test topic {{ help_topic_link }}. Also there should be a related topic link below to the Help module topic page and the linked topic.{% endtrans %}</p>
<p>{% trans %}Nonworditem totranslate.{% endtrans %}</p>
<p>{% trans %}Non-word-item to translate.{% endtrans %}</p>
<p>{% trans %}Test translation.{% endtrans %}</p>
......@@ -8,6 +8,8 @@
use Drupal\Core\Link;
use Drupal\help\Plugin\HelpSection\HelpSectionPluginBase;
// cspell:ignore asdrsad barmm foomm sqruct wcsrefsdf sdeeeee
/**
* Provides a searchable help section for testing.
*
......@@ -47,13 +49,13 @@ public function renderTopicForSearch($topic_id, LanguageInterface $language) {
if ($language->getId() == 'en') {
return [
'title' => 'Foo in English title wcsrefsdf',
'text' => 'Something about foo body notawordenglish sqruct',
'text' => 'Something about foo body not-a-word-english sqruct',
'url' => Url::fromUri('https://foo.com'),
];
}
return [
'title' => 'Foomm Foreign heading',
'text' => 'Fake foreign foo text notawordgerman asdrsad',
'text' => 'Fake foreign foo text not-a-word-german asdrsad',
'url' => Url::fromUri('https://mm.foo.com'),
];
......@@ -61,13 +63,13 @@ public function renderTopicForSearch($topic_id, LanguageInterface $language) {
if ($language->getId() == 'en') {
return [
'title' => 'Bar in English',
'text' => 'Something about bar anotherwordenglish asdrsad',
'text' => 'Something about bar another-word-english asdrsad',
'url' => Url::fromUri('https://bar.com'),
];
}
return [
'title' => \Drupal::state()->get('help_topics_test:translated_title', 'Barmm Foreign sdeeeee'),
'text' => 'Fake foreign barmm anotherwordgerman sqruct',
'text' => 'Fake foreign barmm another-word-german sqruct',
'url' => Url::fromUri('https://mm.bar.com'),
];
......
......@@ -5,6 +5,9 @@
use Drupal\Tests\Traits\Core\CronRunTrait;
use Drupal\help_topics\Plugin\Search\HelpSearch;
// cspell:ignore asdrsad barmm foomm hilfetestmodul sdeeeee sqruct
// cspell:ignore wcsrefsdf übersetzung
/**
* Verifies help topic search.
*
......@@ -63,7 +66,7 @@ protected function setUp(): void {
// Before running cron, verify that a search returns no results and shows
// warning.
$this->drupalGet('search/help');
$this->submitForm(['keys' => 'notawordenglish'], 'Search');
$this->submitForm(['keys' => 'not-a-word-english'], 'Search');
$this->assertSearchResultsCount(0);
$this->assertSession()->statusMessageContains('Help search is not fully indexed', 'warning');
......@@ -83,7 +86,7 @@ protected function setUp(): void {
$this->assertSession()->pageTextContains('100% of the site has been indexed');
// Search and verify there is no warning.
$this->drupalGet('search/help');
$this->submitForm(['keys' => 'notawordenglish'], 'Search');
$this->submitForm(['keys' => 'not-a-word-english'], 'Search');
$this->assertSearchResultsCount(1);
$this->assertSession()->statusMessageNotContains('Help search is not fully indexed');
}
......@@ -100,26 +103,26 @@ public function testHelpSearch() {
// by the topics that come from
// \Drupal\help_topics_test\Plugin\HelpSection\TestHelpSection.
$this->drupalGet('search/help');
$this->submitForm(['keys' => 'notawordenglish'], 'Search');
$this->submitForm(['keys' => 'not-a-word-english'], 'Search');
$this->assertSearchResultsCount(1);
$session->linkExists('Foo in English title wcsrefsdf');
// Same for German.
$this->drupalGet('search/help', ['language' => $german]);
$this->submitForm(['keys' => 'notawordgerman'], 'Search');
$this->submitForm(['keys' => 'not-a-word-german'], 'Search');
$this->assertSearchResultsCount(1);
$session->linkExists('Foomm Foreign heading');
// Verify when we search in English for a word that only exists in German,
// we get no results.
$this->drupalGet('search/help');
$this->submitForm(['keys' => 'notawordgerman'], 'Search');
$this->submitForm(['keys' => 'not-a-word-german'], 'Search');
$this->assertSearchResultsCount(0);
$session->pageTextContains('no results');
// Same for German.
$this->drupalGet('search/help', ['language' => $german]);
$this->submitForm(['keys' => 'notawordenglish'], 'Search');
$this->submitForm(['keys' => 'not-a-word-english'], 'Search');
$this->assertSearchResultsCount(0);
$session->pageTextContains('no results');
......@@ -141,7 +144,7 @@ public function testHelpSearch() {
// that we can search for translated regular help topics, in both English
// and German.
$this->drupalGet('search/help');
$this->submitForm(['keys' => 'nonworditem'], 'Search');
$this->submitForm(['keys' => 'non-word-item'], 'Search');
$this->assertSearchResultsCount(1);
$session->linkExists('ABC Help Test module');
// Click the link and verify we ended up on the topic page.
......@@ -149,7 +152,7 @@ public function testHelpSearch() {
$session->pageTextContains('This is a test');
$this->drupalGet('search/help', ['language' => $german]);
$this->submitForm(['keys' => 'nonwordgerman'], 'Search');
$this->submitForm(['keys' => 'non-word-german'], 'Search');
$this->assertSearchResultsCount(1);
$session->linkExists('ABC-Hilfetestmodul');
$this->clickLink('ABC-Hilfetestmodul');
......@@ -158,13 +161,13 @@ public function testHelpSearch() {
// Verify that we can search from the admin/help page.
$this->drupalGet('admin/help');
$session->pageTextContains('Search help');
$this->submitForm(['keys' => 'nonworditem'], 'Search');
$this->submitForm(['keys' => 'non-word-item'], 'Search');
$this->assertSearchResultsCount(1);
$session->linkExists('ABC Help Test module');
// Same for German.
$this->drupalGet('admin/help', ['language' => $german]);
$this->submitForm(['keys' => 'nonwordgerman'], 'Search');
$this->submitForm(['keys' => 'non-word-german'], 'Search');
$this->assertSearchResultsCount(1);
$session->linkExists('ABC-Hilfetestmodul');
......@@ -228,12 +231,12 @@ public function testHelpSearch() {
$session->pageTextContains('Search help');
$this->drupalGet('search/help');
$this->submitForm(['keys' => 'nonworditem'], 'Search');
$this->submitForm(['keys' => 'non-word-item'], 'Search');
$this->assertSearchResultsCount(1);
$session->linkExists('ABC Help Test module');
$this->drupalGet('search/help');
$this->submitForm(['keys' => 'notawordenglish'], 'Search');
$this->submitForm(['keys' => 'not-a-word-english'], 'Search');
$this->assertSearchResultsCount(0);
$session->pageTextContains('no results');
......@@ -241,7 +244,7 @@ public function testHelpSearch() {
// searchable.
\Drupal::service('module_installer')->uninstall(['help_topics_test']);
$this->drupalGet('search/help');
$this->submitForm(['keys' => 'nonworditem'], 'Search');
$this->submitForm(['keys' => 'non-word-item'], 'Search');
$this->assertSearchResultsCount(0);
}
......
......@@ -4,6 +4,8 @@
use Drupal\Tests\BrowserTestBase;
// cspell:ignore hilfetestmodul übersetzung
/**
* Provides a base class for functional help topic tests that use translation.
*
......@@ -73,8 +75,8 @@ protected function installParameters() {
msgid "Test translation."
msgstr "Übersetzung testen."
msgid "Nonworditem totranslate."
msgstr "Nonwordgerman sdfwedrsdf."
msgid "Non-word-item to translate."
msgstr "Non-word-german sdfwedrsdf."
ENDPO;
include_once $this->root . '/core/includes/install.core.inc';
......
......@@ -2,6 +2,8 @@
namespace Drupal\Tests\help_topics\Functional;
// cspell:ignore hilfetestmodul übersetzung
/**
* Verifies help topic translations.
*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment