Commit b69f2351 authored by Weblate's avatar Weblate

Merge remote-tracking branch 'origin/master'

parents 41c141e8 979d4869
......@@ -190,7 +190,7 @@
"no-use-before-define": "off",
"no-useless-call": "error",
"no-useless-computed-key": "error",
"no-useless-concat": "error",
"no-useless-concat": "off",
"no-useless-constructor": "error",
"no-useless-escape": "off",
"no-useless-rename": "error",
......
# Changelog
## 3.2.1 (Unreleased)
### Bugfixes
- Various IE11 fixes.
- Translations written as template literals [aren't parsed properly by xgettext](https://savannah.gnu.org/bugs/?50920).
## 3.2.0 (2017-08-09)
### New Plugins
......
......@@ -61,11 +61,11 @@ serve_bg: dev
########################################################################
## Translation machinery
GETTEXT = xgettext --keyword=__ --keyword=___ --from-code=UTF-8 --output=locale/converse.pot src/*.js --package-name=Converse.js --copyright-holder="Jan-Carel Brand" --package-version=3.2.0-rc -c
GETTEXT = xgettext --language="JavaScript" --keyword=__ --keyword=___ --from-code=UTF-8 --output=locale/converse.pot src/*.js --package-name=Converse.js --copyright-holder="Jan-Carel Brand" --package-version=3.2.0-rc -c
.PHONY: pot
pot:
$(GETTEXT) --language="javascript" 2>&1 > /dev/null; test $$? -eq 0 && exit 0 || $(GETTEXT) --language="python" && exit $$?;
$(GETTEXT) 2>&1 > /dev/null; exit $$?;
.PHONY: po
po:
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -31,6 +31,10 @@
null,
"Annuler"
],
"Are you sure you want to remove the bookmark \"%1$s\"?": [
null,
"Voulez-vous vraiment retirer le marque-page « %1$s » ?"
],
"Sorry, something went wrong while trying to save your bookmark.": [
null,
"Désolé, quelque chose s’est mal passé pendant la sauvegarde de ce marque-page."
......@@ -39,9 +43,21 @@
null,
"Cliquer pour ouvrir la liste des salons"
],
"Bookmarks": [
null,
"Marques-page"
],
"Leave this room": [
null,
"Quitter ce salon"
],
"Remove this bookmark": [
null,
"Supprimer ce marque-page"
"Retirer ce marque-page"
],
"Unbookmark this room": [
null,
"Retirer ce salon"
],
"Show more information on this room": [
null,
......@@ -65,7 +81,7 @@
],
"Send": [
null,
""
"Envoyer"
],
"me": [
null,
......@@ -77,7 +93,7 @@
],
"Typing from another device": [
null,
""
"Saisie depuis un autre appareil"
],
"is typing": [
null,
......@@ -85,7 +101,7 @@
],
"Stopped typing on the other device": [
null,
""
"Fin de saisie depuis l’autre appareil"
],
"has stopped typing": [
null,
......@@ -381,7 +397,7 @@
],
"${command}": [
null,
""
"${command}"
],
"Are you sure you want to clear the messages from this room?": [
null,
......@@ -503,6 +519,34 @@
null,
" a rejoint le salon."
],
"You are not on the member list of this room.": [
null,
"Vous n’êtes pas dans la liste des membres de ce salon."
],
"You have been banned from this room.": [
null,
"Vous avez été banni de ce salon."
],
"No nickname was specified.": [
null,
"Aucun alias n’a été indiqué."
],
"You are not allowed to create new rooms.": [
null,
"Vous n’êtes pas autorisé à créer des salons."
],
"Your nickname doesn't conform to this room's policies.": [
null,
"Votre alias n’est pas conforme à la politique de ce salon."
],
"This room does not (yet) exist.": [
null,
"Ce salon n’existe pas (pour l’instant)."
],
"This room has reached its maximum number of occupants.": [
null,
"Ce salon a atteint sa limite maximale d’occupants."
],
"Topic set by %1$s to: %2$s": [
null,
"Le sujet « %2$s » a été défini par %1$s"
......@@ -583,6 +627,10 @@
null,
"Non sécurisé"
],
"This room is not publicly searchable": [
null,
"Ce salon ne peut pas être recherché publiquement"
],
"Messages are archived on the server": [
null,
"Les messages sont archivés sur le serveur"
......@@ -595,6 +643,10 @@
null,
"Ce salon est modéré"
],
"All other room occupants can see your XMPP username": [
null,
"Tous les autres occupants de ce salon peuvent voir votre nom d’utilisateur XMPP"
],
"Anyone can join this room": [
null,
"N’importe qui peut rejoindre ce salon"
......@@ -603,6 +655,18 @@
null,
"Ce salon nécessite un mot de passe pour y accéder"
],
"This room persists even if it's unoccupied": [
null,
"Ce salon persiste même s'il est inoccupé"
],
"This room is publicly searchable": [
null,
"Ce salon peut être recherché publiquement"
],
"Only moderators can see your XMPP username": [
null,
"Seuls les modérateurs peuvent voir votre identifiant XMPP"
],
"This room will disappear once the last person leaves": [
null,
"Ce salon disparaîtra au départ de la dernière personne"
......@@ -625,7 +689,7 @@
],
"Please enter a valid XMPP username": [
null,
""
"Veuillez saisir un identifiant utilisateur XMPP valide"
],
"Room name": [
null,
......@@ -657,7 +721,7 @@
],
"Room Address (JID):": [
null,
""
"Adresse du salon (JID) :"
],
"Occupants:": [
null,
......@@ -889,7 +953,19 @@
],
"Retry": [
null,
""
"Réessayer"
],
"Click to toggle the rooms list": [
null,
"Cliquer pour ouvrir la liste des salons"
],
"Open Rooms": [
null,
"Ouvrir les salons"
],
"Are you sure you want to leave the room \"%1$s\"?": [
null,
"Voulez-vous vraiment supprimer le marque-page « %1$s » ?"
],
"This contact is busy": [
null,
......@@ -949,15 +1025,27 @@
],
"Unread": [
null,
""
"Non lu"
],
"Chatty": [
null,
""
"Bavard"
],
"Extended Away": [
null,
""
"Absence longue durée"
],
"Click to remove %1$s as a contact": [
null,
"Cliquez pour retirer le contact « %1$s »"
],
"Click to accept the contact request from %1$s": [
null,
"Cliquez pour accepter la demande de « %1$s »"
],
"Click to decline the contact request from %1$s": [
null,
"Cliquez pour décliner la demande de contact de « %1$s »"
],
"Click to chat with this contact": [
null,
......@@ -969,11 +1057,11 @@
],
"Are you sure you want to remove this contact?": [
null,
"Voulez-vous vraiment supprimer ce contact ?"
"Voulez-vous vraiment retirer ce contact ?"
],
"Are you sure you want to decline this contact request?": [
null,
"Voulez-vous vraiment refuser cette demande de contact ?"
"Voulez-vous vraiment décliner cette demande de contact ?"
]
}
}
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -534,7 +534,7 @@
} else if (status === Strophe.Status.CONNFAIL) {
_converse.giveFeedback(
__('Connection failed'), 'error',
__(`An error occurred while connecting to the chat server: ${condition}`)
__('An error occurred while connecting to the chat server: '+condition)
);
_converse.setDisconnectionCause(status, condition);
} else if (status === Strophe.Status.DISCONNECTING) {
......@@ -1144,7 +1144,7 @@
resolve(contact);
},
function (err) {
alert(__(`Sorry, there was an error while trying to add ${name} as a contact.`));
alert(__('Sorry, there was an error while trying to add %1$s as a contact.', name));
_converse.log(err, Strophe.LogLevel.ERROR);
resolve(err);
}
......
......@@ -973,7 +973,8 @@
// TODO check if first argument is valid
if (args.length < 1 || args.length > 2) {
this.showStatusNotification(
__(`Error: the "${command}" command takes two arguments, the user's nickname and optionally a reason.`),
__('Error: the "%1$s" command takes two arguments, the user\'s nickname and optionally a reason.',
command),
true
);
return false;
......@@ -1758,10 +1759,10 @@
if (notification.disconnected) {
this.showDisconnectMessage(notification.disconnection_message);
if (notification.actor) {
this.showDisconnectMessage(__(___('This action was done by %1$s.'), notification.actor));
this.showDisconnectMessage(__('This action was done by %1$s.', notification.actor));
}
if (notification.reason) {
this.showDisconnectMessage(__(___('The reason given is: "%1$s".'), notification.reason));
this.showDisconnectMessage(__('The reason given is: "%1$s".', notification.reason));
}
this.model.save('connection_status', converse.ROOMSTATUS.DISCONNECTED);
return;
......@@ -1770,7 +1771,7 @@
this.$content.append(tpl_info({'message': message}));
});
if (notification.reason) {
this.showStatusNotification(__(`The reason given is: "${notification.reason}"`), true);
this.showStatusNotification(__('The reason given is: "%1$s "', notification.reason), true);
}
if (notification.messages.length) {
this.scrollDown();
......@@ -2077,7 +2078,7 @@
{ 'jid': '',
'show': show,
'hint_show': _converse.PRETTY_CHAT_STATUS[show],
'hint_occupant': __(`Click to mention ${this.model.get('nick')} in your message.`),
'hint_occupant': __('Click to mention %1$s in your message.', this.model.get('nick')),
'desc_moderator': __('This user is a moderator.'),
'desc_occupant': __('This user can send messages in this room.'),
'desc_visitor': __('This user can NOT send messages in this room.')
......@@ -2334,7 +2335,7 @@
promptForInvite (suggestion) {
const reason = prompt(
__(___('You are about to invite %1$s to the chat room "%2$s". '), suggestion.text.label, this.model.get('id')) +
__('You are about to invite %1$s to the chat room "%2$s". ', suggestion.text.label, this.model.get('id')) +
__("You may optionally include a message, explaining the reason for the invitation.")
);
if (reason !== null) {
......@@ -2477,7 +2478,7 @@
informNoRoomsFound () {
const $available_chatrooms = this.$el.find('#available-chatrooms');
// For translators: %1$s is a variable and will be replaced with the XMPP server name
$available_chatrooms.html(`<dt>${__('No rooms on %1$s',this.model.get('muc_domain'))}</dt>`);
$available_chatrooms.html(`<dt>${__('No rooms on %1$s', this.model.get('muc_domain'))}</dt>`);
$('input#show-rooms').show().siblings('span.spinner').remove();
},
......@@ -2676,12 +2677,11 @@
contact = contact? contact.get('fullname'): Strophe.getNodeFromJid(from);
if (!reason) {
result = confirm(
__(___("%1$s has invited you to join a chat room: %2$s"),
contact, room_jid)
__("%1$s has invited you to join a chat room: %2$s", contact, room_jid)
);
} else {
result = confirm(
__(___('%1$s has invited you to join a chat room: %2$s, and left the following reason: "%3$s"'),
__('%1$s has invited you to join a chat room: %2$s, and left the following reason: "%3$s"',
contact, room_jid, reason)
);
}
......
......@@ -667,7 +667,7 @@
this.remove();
},
function (err) {
alert(__(`Sorry, there was an error while trying to remove ${name} as a contact.`));
alert(__('Sorry, there was an error while trying to remove %1$s as a contact.', name));
_converse.log(err, Strophe.LogLevel.ERROR);
}
);
......
......@@ -88,6 +88,25 @@
}
}
function calculateElementHeight (el) {
/* Return the height of the passed in DOM element,
* based on the heights of its children.
*/
return _.reduce(
el.children,
(result, child) => result + child.offsetHeight, 0
);
}
function slideOutWrapup (el) {
/* Wrapup function for slideOut. */
el.removeAttribute('data-slider-marker');
el.classList.remove('collapsed');
el.style.overflow = "";
el.style.height = "";
}
var u = {};
// Translation machinery
......@@ -186,22 +205,12 @@
};
u.slideOut = function (el, duration=900) {
/* Shows/expands an element by sliding it out of itself. */
function calculateEndHeight (el) {
return _.reduce(
el.children,
(result, child) => result + child.offsetHeight, 0
);
}
function wrapup (el) {
el.removeAttribute('data-slider-marker');
el.classList.remove('collapsed');
el.style.overflow = "";
el.style.height = "";
}
/* Shows/expands an element by sliding it out of itself
*
* Parameters:
* (HTMLElement) el - The HTML string
* (Number) duration - The duration amount in milliseconds
*/
return new Promise((resolve, reject) => {
if (_.isNil(el)) {
const err = "Undefined or null element passed into slideOut"
......@@ -214,10 +223,10 @@
el.removeAttribute('data-slider-marker');
window.clearInterval(interval_marker);
}
const end_height = calculateEndHeight(el);
const end_height = calculateElementHeight(el);
if (window.converse_disable_effects) { // Effects are disabled (for tests)
el.style.height = end_height + 'px';
wrapup(el);
slideOutWrapup(el);
resolve();
return;
}
......@@ -234,9 +243,9 @@
// We recalculate the height to work around an apparent
// browser bug where browsers don't know the correct
// offsetHeight beforehand.
el.style.height = calculateEndHeight(el) + 'px';
el.style.height = calculateElementHeight(el) + 'px';
window.clearInterval(interval_marker);
wrapup(el);
slideOutWrapup(el);
resolve();
}
}, interval);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment