2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
@@ -1637,35 +1637,12 @@ function _locale_rebuild_js($langcode = NULL) {
...
@@ -1637,35 +1637,12 @@ function _locale_rebuild_js($langcode = NULL) {
}
}
// Construct the array for JavaScript translations.
// Construct the array for JavaScript translations.
// We sort on plural so that we have all plural forms before singular forms.
// Only add strings with a translation to the translations array.
$result=db_query("SELECT s.lid, s.source, t.plid, t.plural, t.translation FROM {locales_source} s LEFT JOIN {locales_target} t ON s.lid = t.lid AND t.language = :language WHERE s.location LIKE '%.js%' AND s.textgroup = :textgroup ORDER BY t.plural DESC",array(':language'=>$language->language,':textgroup'=>'default'));
$result=db_query("SELECT s.lid, s.source, t.translation FROM {locales_source} s INNER JOIN {locales_target} t ON s.lid = t.lid AND t.language = :language WHERE s.location LIKE '%.js%' AND s.textgroup = :textgroup AND t.translation IS NOT NULL",array(':language'=>$language->language,':textgroup'=>'default'));
$translations=$plurals=array();
$translations=array();
foreach($resultas$data){
foreach($resultas$data){
// Only add this to the translations array when there is actually a translation.
$translations[$data->source]=$data->translation;
if(!empty($data->translation)){
if($data->plural){
// When the translation is a plural form, first add it to another array and