Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing translations #1900

Merged
merged 3 commits into from
Sep 27, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion contribs/gmf/apps/desktop/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
</button>
</p>
<p>
<em ng-if="ctrl.interaction.active" class="text-muted small">
<em translate ng-if="ctrl.interaction.active" class="text-muted small">
Draw a line on the map to display the corresponding elevation profile.
Use double-click to finish the drawing.
</em>
Expand Down
20 changes: 9 additions & 11 deletions contribs/gmf/src/directives/authenticationdirective.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,37 +174,36 @@ gmf.AuthenticationController.prototype.changePassword = function() {
var oldPwd = this.oldPwdVal;
var newPwd = this.newPwdVal;
var confPwd = this.newPwdConfVal;
var cat = this.gettextCatalog;

var errors = [];
// (1) validation - passwords are required
if (oldPwd === '') {
errors.push(cat.getString('The old password is required.'));
errors.push(this.gettextCatalog.getString('The old password is required.'));
}
if (newPwd === '') {
errors.push(cat.getString('The new password is required.'));
errors.push(this.gettextCatalog.getString('The new password is required.'));
}
if (confPwd === '') {
errors.push(cat.getString('The password confirmation is required.'));
errors.push(this.gettextCatalog.getString('The password confirmation is required.'));
}

if (errors.length) {
this.setError_(errors);
} else {
// (2) validation - passwords must be new and must also match
if (oldPwd === newPwd) {
errors.push(cat.getString('The old and new passwords are the same.'));
errors.push(this.gettextCatalog.getString('The old and new passwords are the same.'));
}
if (newPwd !== confPwd) {
errors.push(cat.getString('The passwords don\'t match.'));
errors.push(this.gettextCatalog.getString('The passwords don\'t match.'));
}

if (errors.length) {
this.setError_(errors);
} else {
// (3) send request with current credentials, which may fail if
// the old password given is incorrect.
var error = cat.getString('Incorrect old password.');
var error = this.gettextCatalog.getString('Incorrect old password.');
this.gmfAuthentication_.changePassword(oldPwd, newPwd, confPwd).then(
function() {
this.changePasswordModalShown = true;
Expand All @@ -221,18 +220,17 @@ gmf.AuthenticationController.prototype.changePassword = function() {
* @export
*/
gmf.AuthenticationController.prototype.login = function() {
var cat = this.gettextCatalog;
var errors = [];
if (this.loginVal === '') {
errors.push(cat.getString('The username is required.'));
errors.push(this.gettextCatalog.getString('The username is required.'));
}
if (this.pwdVal === '') {
errors.push(cat.getString('The password is required.'));
errors.push(this.gettextCatalog.getString('The password is required.'));
}
if (errors.length) {
this.setError_(errors);
} else {
var error = cat.getString('Incorrect username or password.');
var error = this.gettextCatalog.getString('Incorrect username or password.');
this.gmfAuthentication_.login(this.loginVal, this.pwdVal).then(
this.resetError_.bind(this),
this.setError_.bind(this, error));
Expand Down
2 changes: 1 addition & 1 deletion src/directives/createfeature.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ ngeo.CreatefeatureController = function(gettext, $compile, $filter, $scope,
helpMsg = gettext('Click to start drawing area');
contMsg = gettext(
'Click to continue drawing<br/>' +
'Double-click or click last starting point to finish'
'Double-click or click starting point to finish'
);

interaction = new ngeo.interaction.MeasureArea(
Expand Down
2 changes: 1 addition & 1 deletion src/directives/measurearea.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ ngeo.measureareaDirective = function($compile, gettext, $filter) {

var helpMsg = gettext('Click to start drawing area');
var contMsg = gettext('Click to continue drawing<br/>' +
'Double-click or click last starting point to finish');
'Double-click or click starting point to finish');

var measureArea = new ngeo.interaction.MeasureArea($filter('ngeoUnitPrefix'), {
style: new ol.style.Style(),
Expand Down