Skip to content
Vlad Timotei edited this page Oct 8, 2021 · 4 revisions

A set of tests to run on a GlotDict version before any release.

Set 1 - Features with a setting

# Test to run Expected result Description Setting
1 Set lang to ro_RO Review this string. Warning: The translation is missing the suggested translation ("legătură") for the term "link" Checks if translation misses glossary terms.
Default: checks.
View code.
Fires on: Save, Suggest, Review, Ctrl+Enter.
Hide warnings for:
missing glossary terms
no_glossary_term_check
2 Review this string. Warning: The translation is missing an initial uppercase letter as "e" is an initial uppercase letter present on the original string. Checks if translation is capitalized when original is capitalized.
Default: checks.
View code.
Fires on: Save, Suggest, Review, Ctrl+Enter.
Hide warnings for:
missing start capitalization
no_initial_uppercase
3 Review this string. Warning: The translation is missing an initial space or non-breaking space. Checks if translation is missing a starting space or non-breaking space.
Default: checks.
View code.
Fires on: Save, Suggest, Review, Ctrl+Enter.
Hide warnings for:
missing start space
no_initial_space
4 Review this string. Warning: The translation is missing an ending space or non-breaking space Checks if translation is missing a end space or nbsp.
Default: checks.
View code.
Fires on: Save, Suggest, Review, Ctrl+Enter.
Hide warnings for:
missing end space
no_trailing_space
5 Review this string. Warning: The translation contains a final ... that should be translated as either … or … Checks if translation ends with and not with ..., if original ends with ...
Default: checks.
View code.
Fires on: Save, Suggest, Review, Ctrl+Enter.
Hide warnings for:
missing end hellip
no_final_dot
6 Review this string. Warning: The translation is missing an ending . or ? or ! Checks if translation ends with one of ; . ! : 、。؟ ?! if original doesn't end with ... but with one of these.
Default: checks.
View code.
Fires on: Save, Suggest, Review, Ctrl+Enter.
Hide warnings for:
missing end symbols ; . ! : 、。؟
no_final_other_dots
7 Review this string with setting enabled. Warning: The translation is using straight apostrophes instead of curly ones. Please check them against your Locale guidelines. Checks if translation contains '
Default: doesn't check.
View code.
Fires on: Save, Suggest, Review, Ctrl+Enter.
Show warnings for:
straight single quote '
curly_apostrophe_warning
8 Preview this string with setting disabled. Highlights curly quote in preview. When the above setting is not active, highlights curly quote.
Default: highlights.
View code.
Fires on: Preview
Show warnings for:
straight single quote '
curly_apostrophe_warning
9 Review this string with setting enabled. Warning: The translation is using straight quotes instead of typographic ones. Please check them against your Locale guidelines. Checks if translation contains ", excluding HTML attributes.
Default: doesn't check.
View code.
Fires on: Save, Suggest, Review, Ctrl+Enter.
Show warnings for:
straight double quote "
localized_quote_warning
10 Preview this string with setting disabled. Highlights non-breaking-spaces in preview. Default: doesn't highlight.
View code.
Fires on: Preview
Hide highlights
for non-breaking spaces.
no_non_breaking_space
11 Open an editor on this page with setting enabled. Copies original to clipboard. Default: doesn't copy.
View code.
Fires on: Editor open
Auto-copy original to clipboard
on editor opening.
autocopy_string_ on_translation_opened
12 Bulk copy original on this page with setting enabled. If you are PTE/GTE and no warnings, originals are saved. Doesn't save if there is a warning.
Default: doesn't attempt saving
View code.
Fires on: Apply
Auto-save after
"Copy from Original" bulk action.*
autosubmit_bulk_ copy_from_original
13 Bulk copy original on this page with both settings enabled. Auto-saves even if there are warnings. Default: respects warnings.
View code.
Fires on: Apply
Ignore auto-save warnings after "Copy from Original".*
force_autosubmit_ bulk_copy_from_original

Set 2 - Features without a setting

# Test to run Expected result Description
1 Bulk copy original this page. Copies from original, opens the editor for the last string selected View code.
Fires on: Apply
2 Review this page. 30 translations have been reviewed. (5 warnings have been flagged). View code 1, 2, 3.
Fires on: Review
3 Save a string with problems. Submission blocked! You need to dismiss all warnings and re-submit the string. View code: 1, 2.
Fires on: Save, Suggest, Review, Ctrl+Enter.
4 Press Ctrl+Shift+Enter while on a string with problems. Submission is not blocked even if it has Warnings - GlotPress or GlotDict View code: 1, 2, 3.
Fires on: Ctrl+Shift+Enter
5 Press Discard or Ctrl+D (also discards GP warnings) on a string with problems. Discard current editor Warnings. View code: 1, 2.
Fires one: Discard, Ctrl+D
6 Press Ctrl+Shift+D on a page with warnings, after review. Discards all GP/GD Warnings on the page. View code.
Fires on: Ctrl+Shift+D
7 View this string and click on a glossary term. Links to Consistency tool View code.
8 View this string and right click on a glossary term. Copies the Glossary term in the textarea View code.
9 Check bulk actions in footer of this page if you are PTE/GTE. Bulk actions menu. View code.
10 View this page. Most strings are older than 6 months and have a black border on the right. View code.
11 View this page. Some strings have glossary terms in them and have a blue border on the left. View code.
12 Bulk copy from original on this page. Blue background for strings that have had their original copied. View code
See issue #296.
13 View this page after you set your locale. Scroll to locale button. View code.
14 View this page after you set your locale. Your locale is first. View code.
15 View this page where you are PTE. Action buttons on the right side. View code.
16 Open any string editor. In the meta panel there is a word and characters counter. View code.
Fires on: change, keyup, paste, focus.
17 On a project page, save, reject, fuzzy some strings. In the header you'll see notices with counts for these actions. View code.
Fires on: Approve, Reject, Fuzzy, Submit, Select
18 Open any editor. See Consistency suggestions in the editor. View code.
Fires on: editor opening, Alt+C
19 On any editor, open or copy QuickLinks. Opens or copy links. View code.
20 On any translations page, pin header to top. Sticky header. View code.
21 On any translation table, click on Filter See a Anonymous author checkbox. View code.
22 On any string Dates are localized View code.
23 On any string with non-translatable items Non-translatable items are clickable, and they grey out when inserted. Also you can insert all. View code.

Set 3- Hotkeys

# Action Hotkey
1 Add Glossary definition in the translation area Right click on a Glossary term
2 Add non-breaking spaces near symbols Ctrl+Shift+X
3 Approve Ctrl+Shift+A
4 Cancel Ctrl+Shift+Z
5 Copy from original Ctrl+Shift+B
6 Dismiss validation warnings for the current visible editor Ctrl+D
7 Dismiss all validation warnings Ctrl+Shift+D
8 Force suggest or Force save translation Ctrl+Shift+Enter
9 Fuzzy Ctrl+Shift+F
10 Load all consistency suggestions Alt+C
11 Open next string editor Page Down
12 Open previous string editor Page Up
13 Reject Ctrl+Shift+R
14 Suggest or Save translation Ctrl+Enter

Set 3 - Update/Install

Action Expected result
Remove extension and Local Storage data and then install a fresh copy (packed or unpacked) See Welcome to GlotDict X.X page
Change version in manifest.json, save and hit Reload (unpacked) See What's new in GlotDict X.X page
Change the version again in manifest.json, update changelog.md, save and hit Reload (unpacked) See if what's new content has changed accordingly
Clear Local Storage, delete changelog.md and hit Reload (or remove extension and install again - same results) (unpacked) All is working properly, no tab pops up, What's new in GlotDict? tab only has a link.

Set 4 - Page types

Use translate.wp.tests extension to open these not logged in, logged in as PTE/GTE and as a contributor and then check the error log.

Page $gp $gp_editor_options
Homepage - -
Stats - -
Consistency - -
Locale main - -
Locale project - -
Locale subproject - -
Locale Stats - -
Locale Glossary Object -
Projects overview - -
Project Object -
Sub project Object -
Plugin & theme sub projects - -
Project Translation Table Object Object
Project Glossary Object -