Fixed translation issues.

This commit is contained in:
Emanuel Schütze 2016-11-01 23:30:54 +01:00
parent b0ff8375a8
commit 4b124a629b
6 changed files with 27 additions and 22 deletions

View File

@ -467,19 +467,21 @@ angular.module('OpenSlidesApp.core.site', [
var config = Config.get(field.key);
$scope.type = getHtmlType(field.input_type);
if ($scope.type == 'choice') {
$scope.choices = [];
angular.forEach(field.choices, function(choice) {
choice.display_name = gettextCatalog.getString(choice.display_name);
$scope.choices.push(choice);
});
$scope.choices = field.choices;
$scope.value = config.value;
} else {
$scope.value = gettextCatalog.getString(config.value);
}
$scope.label = field.label;
$scope.key = 'field-' + field.key;
$scope.value = gettextCatalog.getString(config.value);
$scope.help_text = field.help_text;
$scope.default_value = field.default_value;
$scope.reset = function () {
if ($scope.type == 'choice') {
$scope.value = $scope.default_value;
} else {
$scope.value = gettextCatalog.getString($scope.default_value);
}
$scope.save(field.key, $scope.value);
};
}

View File

@ -76,8 +76,8 @@
ng-model="$parent.value"
ng-model-options="{debounce: 500}"
ng-change="save(configOption.key, $parent.value)"
id="{{ key }}"
class="form-control" ng-options="option.value as option.display_name for option in choices">
id="{{ key }}" class="form-control"
ng-options="option.value as option.display_name | translate for option in choices">
</select>
<span class="input-group-btn">

View File

@ -64,7 +64,7 @@ def get_config_variables():
choices=(
{'value': 'outside', 'display_name': 'Outside'},
{'value': 'inline', 'display_name': 'Inline'},
{'value': 'none', 'display_name': 'None'}),
{'value': 'none', 'display_name': 'Disabled'}),
weight=322,
group='Motions',
subgroup='General')

View File

@ -13,7 +13,7 @@
<div class="details">
<div class="lead-div">
<p class="lead" translate>
Drag and drop motions to reorder the category and when finished, renumber them.
Drag and drop motions to reorder the category. Then click the button to renumber.
</p>
<a os-perms="motions.can_manage" class="btn btn-primary btn-sm" ng-click="numbering()">
<i class="fa fa-sort-numeric-asc fa-lg"></i>

View File

@ -202,7 +202,7 @@
<div class="input-group">
<span><translate>Required majority</translate>: </span>
<select ng-init="config('motions_poll_default_majority_method')" ng-model="$parent.method"
ng-options="option.value as option.display_name for option in methodChoices" />
ng-options="option.value as option.display_name | translate for option in methodChoices" />
</div>
</div>
@ -387,6 +387,7 @@
</div>
<!-- log -->
<div os-perms="motions.can_manage">
<button type="button" class="btn btn-sm btn-default spacer" ng-click="isCollapsed = !isCollapsed" translate>
Show history
</button>
@ -400,6 +401,7 @@
</div>
</div>
</div>
</div>
</div>
</div>

View File

@ -1345,6 +1345,7 @@ angular.module('OpenSlidesApp.users.site', [
gettext('Can manage tags');
gettext('Can manage configuration');
gettext('Can use the chat');
gettext('Can manage the chat');
// mediafiles
gettext('Can see the list of files');
gettext('Can upload files');