Skip to content

Commit

Permalink
MDL-36236 cache: clarified locking strings
Browse files Browse the repository at this point in the history
We copy the cachedef_locking string as that cache definition is
used for locking and its name is more than likely the descriptive
word we are looking for.

AMOS BEGIN
  CPY [cachedef_locking,cache],[locking,cache]
AMOS END
  • Loading branch information
Sam Hemelryk committed Nov 20, 2014
1 parent ca0e301 commit 32bc898
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
6 changes: 3 additions & 3 deletions cache/forms.php
Expand Up @@ -65,13 +65,13 @@ protected final function definition() {
}

if (is_array($locks)) {
$form->addElement('select', 'lock', get_string('lockmethod', 'cache'), $locks);
$form->addHelpButton('lock', 'lockmethod', 'cache');
$form->addElement('select', 'lock', get_string('locking', 'cache'), $locks);
$form->addHelpButton('lock', 'locking', 'cache');
$form->setType('lock', PARAM_ALPHANUMEXT);
} else {
$form->addElement('hidden', 'lock', '');
$form->setType('lock', PARAM_ALPHANUMEXT);
$form->addElement('static', 'lock-value', get_string('lockmethod', 'cache'),
$form->addElement('static', 'lock-value', get_string('locking', 'cache'),
'<em>'.get_string('nativelocking', 'cache').'</em>');
}

Expand Down
2 changes: 1 addition & 1 deletion cache/renderer.php
Expand Up @@ -53,7 +53,7 @@ public function store_instance_summariers(array $stores, array $plugins) {
get_string('mappings', 'cache'),
get_string('modes', 'cache'),
get_string('supports', 'cache'),
get_string('lockingmeans', 'cache'),
get_string('locking', 'cache') . ' ' . $this->output->help_icon('locking', 'cache'),
get_string('actions', 'cache'),
);
$table->colclasses = array(
Expand Down
10 changes: 7 additions & 3 deletions lang/en/cache.php
Expand Up @@ -99,9 +99,8 @@
$string['invalidplugin'] = 'Invalid plugin';
$string['invalidstore'] = 'Invalid cache store provided';
$string['lockdefault'] = 'Default';
$string['lockingmeans'] = 'Locking mechanism';
$string['lockmethod'] = 'Lock method';
$string['lockmethod_help'] = 'This is the method used for locking when required of this store.';
$string['locking'] = 'Locking';
$string['locking_help'] = 'Locking is an essential part of caching, its a process in which exclusive access to cached data is requested by code so that no other code can read the data or overwrite it at the same time. The locking method determines how that lock is acquired and checked.';
$string['lockname'] = 'Name';
$string['locknamedesc'] = 'The name must be unique and can only consist of the characters: a-zA-Z_';
$string['locknamenotunique'] = 'The name you have selected is not unique. Please select a unique name.';
Expand Down Expand Up @@ -170,3 +169,8 @@
$string['untestable'] = 'Untestable';
$string['userinputsharingkey'] = 'Custom key for sharing';
$string['userinputsharingkey_help'] = 'Enter your own private key here. When you set up other stores on other sites you wish to share data with make sure you set the exact same key there.';

// Deprecated since 2.9
$string['lockingmeans'] = 'Locking mechanism';
$string['lockmethod'] = 'Lock method';
$string['lockmethod_help'] = 'This is the method used for locking when required of this store.';
3 changes: 3 additions & 0 deletions lang/en/deprecated.txt
Expand Up @@ -7,3 +7,6 @@ hidden,core_role
simpleview,core_grades
fullview,core_grades
categoriesedit,core_grades
lockingmeans,core_cache
lockmethod,core_cache
lockmethod_help,core_cache

0 comments on commit 32bc898

Please sign in to comment.