Added and fixed gettext usage for better translation coverage. Fixes #5284

1) Fixed usage gettext('') instead of _('') in javascript files.
  2) Fixed usage gettext('') instead of `${gettext('')}` in javascript files,
     because "pybabel extract" not support extracting from this syntax.
This commit is contained in:
Libor M
2020-03-24 11:14:05 +05:30
committed by Akshay Joshi
parent 6988ce96d7
commit 94864104e4
45 changed files with 137 additions and 130 deletions

View File

@@ -311,8 +311,8 @@ define('misc.bgprocess', [
</div>
<div class="pg-bg-etime my-auto mr-2"></div>
<div class="ml-auto">
<button class="btn btn-secondary pg-bg-more-details"><span class="fa fa-info-circle" role="img"></span>&nbsp;${gettext('More details...')}</button>
<button class="btn btn-danger bg-process-stop"><span class="fa fa-times-circle" role="img"></span>&nbsp;${gettext('Stop Process')}</button>
<button class="btn btn-secondary pg-bg-more-details"><span class="fa fa-info-circle" role="img"></span>&nbsp;` + gettext('More details...') + `</button>
<button class="btn btn-danger bg-process-stop"><span class="fa fa-times-circle" role="img"></span>&nbsp;` + gettext('Stop Process') + `</button>
</div>
</div>
<div class="pg-bg-status py-1">
@@ -393,7 +393,7 @@ define('misc.bgprocess', [
is_new = true;
panel = this.panel =
pgBrowser.BackgroundProcessObsorver.create_panel();
panel.title('Process Watcher - ' + self.type_desc);
panel.title(gettext('Process Watcher - %s', self.type_desc));
panel.focus();
}
@@ -419,7 +419,7 @@ define('misc.bgprocess', [
setTimeout(function() {
self.logs[0].scrollTop = self.logs[0].scrollHeight;
});
self.logs_loading = $(`<li class="pg-bg-res-out loading-logs">${gettext('Loading process logs...')}</li>`);
self.logs_loading = $('<li class="pg-bg-res-out loading-logs">' + gettext('Loading process logs...') + '</li>');
self.logs.append(self.logs_loading);
// set bgprocess detailed description
$header.find('.bg-detailed-desc').html(self.detailed_desc);