fixed minor bug
This commit is contained in:
14
common.php
14
common.php
@ -339,13 +339,15 @@ function qdb_all_questionnaire_translation_key_set(PDO $pdo): array {
|
||||
return $cache;
|
||||
}
|
||||
|
||||
/** App UI catalog entries for coaches (excludes dev-only and questionnaire-scoped keys). */
|
||||
function qdb_app_ui_string_entries_global_only(PDO $pdo): array {
|
||||
$used = qdb_all_questionnaire_translation_key_set($pdo);
|
||||
/**
|
||||
* App UI catalog for the website Translations page (coach-visible, no dev-only keys).
|
||||
* Catalog keys always appear here even when also used inside a questionnaire (e.g. "save").
|
||||
*/
|
||||
function qdb_app_ui_string_entries_for_website(): array {
|
||||
$dev = qdb_dev_only_app_string_key_set();
|
||||
$entries = [];
|
||||
foreach (qdb_app_ui_string_entries() as $e) {
|
||||
if (!isset($used[$e['key']]) && !isset($dev[$e['key']])) {
|
||||
if (!isset($dev[$e['key']])) {
|
||||
$entries[] = $e;
|
||||
}
|
||||
}
|
||||
@ -438,10 +440,14 @@ function qdb_translation_entry_lists(PDO $pdo, string $qnID): array {
|
||||
}
|
||||
}
|
||||
|
||||
$appKeySet = qdb_app_string_key_set();
|
||||
$stringOrder = 0;
|
||||
$skList = array_keys($stringKeys);
|
||||
sort($skList, SORT_STRING);
|
||||
foreach ($skList as $sk) {
|
||||
if (isset($appKeySet[$sk])) {
|
||||
continue;
|
||||
}
|
||||
$stringEntries[] = [
|
||||
'key' => $sk,
|
||||
'type' => 'string',
|
||||
|
||||
Reference in New Issue
Block a user