Skip to content

Commit e7a14e1

Browse files
author
tituspijean
authored
[enh] locales: make server name a variable (#37)
* [enh] locales: make server name a variable Enables translation into languages that do not put the server name at the end of the sentence. * [enh] locale: server name as variable in login modal
1 parent ee33d7a commit e7a14e1

File tree

8 files changed

+11
-13
lines changed

8 files changed

+11
-13
lines changed

js/dist/admin.js

Lines changed: 1 addition & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/dist/admin.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/dist/forum.js

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/dist/forum.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/src/forum/components/LDAPLogInModal.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export default class LDAPLogInModal extends Modal {
4141
}
4242

4343
title() {
44-
return app.translator.trans(translationPrefix + 'log_in_with') + ' ' + app.forum.attribute('LDAP_method_name');
44+
return app.translator.trans(translationPrefix + 'log_in_with', {server: app.forum.attribute('LDAP_method_name')});
4545
}
4646

4747
content() {

js/src/forum/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ app.initializers.add('tituspijean-auth-ldap', function() {
3434
if (items.has('logIn')) {
3535
items.add('logInLDAP',
3636
Button.component({
37-
children: app.translator.trans(translationPrefix + 'log_in_with') + ' ' + app.forum.attribute('LDAP_method_name'),
37+
children: app.translator.trans(translationPrefix + 'log_in_with', {server: app.forum.attribute('LDAP_method_name')}),
3838
className: 'Button Button--link',
3939
onclick: () => app.modal.show(new LDAPLogInModal())
4040
}), 0

locale/en.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
tituspijean-auth-ldap:
22
forum:
3-
log_in_with: Log in with
3+
log_in_with: "Log in with {server}"
44
log_out: => core.ref.log_out
55
admin:
66
settings:

locale/fr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
tituspijean-auth-ldap:
22
forum:
3-
log_in_with: Connexion par
3+
log_in_with: "Connexion via {server}"
44
log_out: => core.ref.log_out
55
admin:
66
settings:

0 commit comments

Comments
 (0)