Bug 1889422 - Chat Fluent Migrations - Properties Files. r=rjl
Differential Revision: https://phabricator.services.mozilla.com/D207068 --HG-- extra : amend_source : 121e9c5e237f09f0bd5aaef80401bb69d6b92fe0
This commit is contained in:
Родитель
53d220a255
Коммит
d6c690b195
|
@ -37,10 +37,6 @@ pref("messenger.conversations.alwaysClose", false);
|
|||
pref("messenger.conversations.holdByDefault", false);
|
||||
|
||||
pref("messenger.conversations.selections.magicCopyEnabled", true);
|
||||
pref("messenger.conversations.selections.ellipsis", "chrome://chat/locale/conversations.properties");
|
||||
pref("messenger.conversations.selections.systemMessagesTemplate", "chrome://chat/locale/conversations.properties");
|
||||
pref("messenger.conversations.selections.contentMessagesTemplate", "chrome://chat/locale/conversations.properties");
|
||||
pref("messenger.conversations.selections.actionMessagesTemplate", "chrome://chat/locale/conversations.properties");
|
||||
|
||||
pref("messenger.conversations.textbox.autoResize", true);
|
||||
pref("messenger.conversations.textbox.defaultMaxLines", 5);
|
||||
|
@ -65,7 +61,7 @@ pref("messenger.status.reportIdle", true);
|
|||
// default 5 minutes
|
||||
pref("messenger.status.timeBeforeIdle", 300);
|
||||
pref("messenger.status.awayWhenIdle", true);
|
||||
pref("messenger.status.defaultIdleAwayMessage", "chrome://chat/locale/status.properties");
|
||||
pref("messenger.status.defaultIdleAwayMessage", "");
|
||||
pref("messenger.status.userIconFileName", "");
|
||||
pref("messenger.status.userDisplayName", "");
|
||||
|
||||
|
|
|
@ -7,7 +7,6 @@ import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
|||
import {
|
||||
ClassInfo,
|
||||
executeSoon,
|
||||
l10nHelper,
|
||||
} from "resource:///modules/imXPCOMUtils.sys.mjs";
|
||||
|
||||
import { MailServices } from "resource:///modules/MailServices.sys.mjs";
|
||||
|
@ -18,8 +17,10 @@ import {
|
|||
} from "resource:///modules/jsProtoHelper.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
ChromeUtils.defineLazyGetter(lazy, "_", () =>
|
||||
l10nHelper("chrome://chat/locale/accounts.properties")
|
||||
ChromeUtils.defineLazyGetter(
|
||||
lazy,
|
||||
"l10n",
|
||||
() => new Localization(["chat/accounts-properties.ftl"], true)
|
||||
);
|
||||
ChromeUtils.defineLazyGetter(lazy, "_maxDebugMessages", () =>
|
||||
Services.prefs.getIntPref("messenger.accounts.maxDebugMessages")
|
||||
|
@ -812,10 +813,14 @@ imAccount.prototype = {
|
|||
if (
|
||||
!prompts.promptPassword(
|
||||
null,
|
||||
lazy._("passwordPromptTitle", this.name),
|
||||
lazy._("passwordPromptText", this.name),
|
||||
lazy.l10n.formatValueSync("password-prompt-title", {
|
||||
accountName: this.name,
|
||||
}),
|
||||
lazy.l10n.formatValueSync("password-prompt-text", {
|
||||
accountName: this.name,
|
||||
}),
|
||||
password,
|
||||
lazy._("passwordPromptSaveCheckbox"),
|
||||
lazy.l10n.formatValueSync("password-prompt-save-checkbox"),
|
||||
shouldSave
|
||||
)
|
||||
) {
|
||||
|
|
|
@ -3,12 +3,12 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import { IMServices } from "resource:///modules/IMServices.sys.mjs";
|
||||
import { l10nHelper } from "resource:///modules/imXPCOMUtils.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineLazyGetter(lazy, "_", () =>
|
||||
l10nHelper("chrome://chat/locale/commands.properties")
|
||||
ChromeUtils.defineLazyGetter(
|
||||
lazy,
|
||||
"l10n",
|
||||
() => new Localization(["chat/commands.ftl"], true)
|
||||
);
|
||||
|
||||
/**
|
||||
|
@ -57,7 +57,7 @@ export class CommandsService {
|
|||
this.registerCommand({
|
||||
name: "say",
|
||||
get helpString() {
|
||||
return lazy._("sayHelpString");
|
||||
return lazy.l10n.formatValueSync("say-help-string");
|
||||
},
|
||||
usageContext: this.COMMAND_CONTEXT.ALL,
|
||||
priority: this.COMMAND_PRIORITY.HIGH,
|
||||
|
@ -69,7 +69,7 @@ export class CommandsService {
|
|||
this.registerCommand({
|
||||
name: "raw",
|
||||
get helpString() {
|
||||
return lazy._("rawHelpString");
|
||||
return lazy.l10n.formatValueSync("raw-help-string");
|
||||
},
|
||||
usageContext: this.COMMAND_CONTEXT.ALL,
|
||||
priority: this.COMMAND_PRIORITY.DEFAULT,
|
||||
|
@ -90,7 +90,7 @@ export class CommandsService {
|
|||
|
||||
name: "help",
|
||||
get helpString() {
|
||||
return lazy._("helpHelpString");
|
||||
return lazy.l10n.formatValueSync("help-help-string");
|
||||
},
|
||||
usageContext: this.COMMAND_CONTEXT.ALL,
|
||||
priority: this.COMMAND_PRIORITY.DEFAULT,
|
||||
|
@ -114,7 +114,9 @@ export class CommandsService {
|
|||
.map(aCmd => aCmd.name)
|
||||
.sort()
|
||||
.join(", ");
|
||||
const message = lazy._("commands", cmds);
|
||||
const message = lazy.l10n.formatValueSync("commands-key", {
|
||||
command: cmds,
|
||||
});
|
||||
|
||||
// Display the message
|
||||
conv.systemMessage(message);
|
||||
|
@ -126,7 +128,9 @@ export class CommandsService {
|
|||
|
||||
if (!cmdArray.length) {
|
||||
// No command that matches.
|
||||
const message = lazy._("noCommand", aMsg);
|
||||
const message = lazy.l10n.formatValueSync("no-command", {
|
||||
command: aMsg,
|
||||
});
|
||||
conv.systemMessage(message);
|
||||
return true;
|
||||
}
|
||||
|
@ -136,7 +140,7 @@ export class CommandsService {
|
|||
|
||||
let text = cmd.helpString;
|
||||
if (!text) {
|
||||
text = lazy._("noHelp", cmd.name);
|
||||
text = lazy.l10n.formatValueSync("no-help-key", { command: aMsg });
|
||||
}
|
||||
|
||||
// Display the message.
|
||||
|
@ -158,7 +162,10 @@ export class CommandsService {
|
|||
this.registerCommand({
|
||||
name: cmd,
|
||||
get helpString() {
|
||||
return lazy._("statusCommand", this.name, lazy._(this.name));
|
||||
return lazy.l10n.formatValueSync("status-command", {
|
||||
command: this.name,
|
||||
status: lazy.l10n.formatValueSync(`${this.name}-key-key`),
|
||||
});
|
||||
},
|
||||
usageContext: this.COMMAND_CONTEXT.ALL,
|
||||
priority: this.COMMAND_PRIORITY.HIGH,
|
||||
|
|
|
@ -6,15 +6,15 @@ import { IMServices } from "resource:///modules/IMServices.sys.mjs";
|
|||
import {
|
||||
executeSoon,
|
||||
ClassInfo,
|
||||
l10nHelper,
|
||||
} from "resource:///modules/imXPCOMUtils.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineLazyGetter(lazy, "_", () =>
|
||||
l10nHelper("chrome://chat/locale/contacts.properties")
|
||||
ChromeUtils.defineLazyGetter(
|
||||
lazy,
|
||||
"l10n",
|
||||
() => new Localization(["chat/contacts.ftl"], true)
|
||||
);
|
||||
|
||||
var gDBConnection = null;
|
||||
|
||||
function executeAsyncThenFinalize(statement) {
|
||||
|
@ -138,7 +138,7 @@ class TagsService {
|
|||
* @type {imITag}
|
||||
*/
|
||||
get defaultTag() {
|
||||
return this.createTag(lazy._("defaultGroup"));
|
||||
return this.createTag(lazy.l10n.formatValueSync("default-group"));
|
||||
}
|
||||
/**
|
||||
* Creates a new tag or gets an existing tag if one already exists.
|
||||
|
|
|
@ -11,8 +11,10 @@ var gLastPrplConvId = 0;
|
|||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineLazyGetter(lazy, "bundle", () =>
|
||||
Services.strings.createBundle("chrome://chat/locale/conversations.properties")
|
||||
ChromeUtils.defineLazyGetter(
|
||||
lazy,
|
||||
"l10n",
|
||||
() => new Localization(["chat/conversations.ftl"], true)
|
||||
);
|
||||
|
||||
export function imMessage(aPrplMessage) {
|
||||
|
@ -236,10 +238,11 @@ export class UIConversation {
|
|||
if (shouldNotify) {
|
||||
this.notifyObservers(this, "target-prpl-conversation-changed");
|
||||
const target = this.target;
|
||||
const params = [target.title, target.account.protocol.name];
|
||||
this.systemMessage(
|
||||
lazy.bundle.formatStringFromName("targetChanged", params)
|
||||
);
|
||||
const params = {
|
||||
displayName: target.title,
|
||||
statusType: target.account.protocol.name,
|
||||
};
|
||||
this.systemMessage(lazy.l10n.formatValueSync("target-changed", params));
|
||||
}
|
||||
}
|
||||
// Returns a boolean indicating if the ui-conversation was closed.
|
||||
|
@ -446,22 +449,29 @@ export class UIConversation {
|
|||
|
||||
let msg;
|
||||
if (statusType == Ci.imIStatusInfo.STATUS_UNKNOWN) {
|
||||
msg = lazy.bundle.formatStringFromName("statusUnknown", [this.title]);
|
||||
msg = lazy.l10n.formatValueSync("status-unknown", {
|
||||
displayName: this.title,
|
||||
});
|
||||
} else {
|
||||
const status = Status.toLabel(statusType);
|
||||
let stringId = wasUnknown ? "statusChangedFromUnknown" : "statusChanged";
|
||||
let stringId = wasUnknown
|
||||
? "status-changed-from-unknown"
|
||||
: "status-changed";
|
||||
if (this._justReconnected) {
|
||||
stringId = "statusKnown";
|
||||
stringId = "status-known";
|
||||
delete this._justReconnected;
|
||||
}
|
||||
if (statusText) {
|
||||
msg = lazy.bundle.formatStringFromName(stringId + "WithStatusText", [
|
||||
this.title,
|
||||
status,
|
||||
msg = lazy.l10n.formatValueSync(`${stringId}-with-status-text`, {
|
||||
displayName: this.title,
|
||||
statusType: status,
|
||||
statusText,
|
||||
]);
|
||||
});
|
||||
} else {
|
||||
msg = lazy.bundle.formatStringFromName(stringId, [this.title, status]);
|
||||
msg = lazy.l10n.formatValueSync(stringId, {
|
||||
displayName: this.title,
|
||||
statusType: status,
|
||||
});
|
||||
}
|
||||
}
|
||||
this.systemMessage(msg);
|
||||
|
@ -482,14 +492,14 @@ export class UIConversation {
|
|||
if (this.isChat && this.left) {
|
||||
this._wasLeft = true;
|
||||
} else {
|
||||
this.systemMessage(lazy.bundle.GetStringFromName("accountDisconnected"));
|
||||
this.systemMessage(lazy.l10n.formatValueSync("account-disconnected"));
|
||||
}
|
||||
this.notifyObservers(this, "update-buddy-status");
|
||||
}
|
||||
connected() {
|
||||
if (this._disconnected) {
|
||||
delete this._disconnected;
|
||||
const msg = lazy.bundle.GetStringFromName("accountReconnected");
|
||||
const msg = lazy.l10n.formatValueSync("account-reconnected");
|
||||
if (this.isChat) {
|
||||
if (!this._wasLeft) {
|
||||
this.systemMessage(msg);
|
||||
|
@ -749,7 +759,7 @@ export class UIConversation {
|
|||
* @type {string}
|
||||
*/
|
||||
get noTopicString() {
|
||||
return lazy.bundle.GetStringFromName("noTopic");
|
||||
return lazy.l10n.formatValueSync("no-topic-key");
|
||||
}
|
||||
get nick() {
|
||||
return this.target.nick;
|
||||
|
|
|
@ -18,6 +18,13 @@ var kPrefTimeBeforeIdle = "messenger.status.timeBeforeIdle";
|
|||
var kPrefAwayWhenIdle = "messenger.status.awayWhenIdle";
|
||||
var kPrefDefaultMessage = "messenger.status.defaultIdleAwayMessage";
|
||||
|
||||
const lazy = {};
|
||||
ChromeUtils.defineLazyGetter(
|
||||
lazy,
|
||||
"l10n",
|
||||
() => new Localization(["chat/status.ftl"], true)
|
||||
);
|
||||
|
||||
var NS_IOSERVICE_GOING_OFFLINE_TOPIC = "network:offline-about-to-go-offline";
|
||||
var NS_IOSERVICE_OFFLINE_STATUS_TOPIC = "network:offline-status-changed";
|
||||
|
||||
|
@ -195,10 +202,12 @@ UserStatus.prototype = {
|
|||
this.idleTime = idleTime;
|
||||
if (Services.prefs.getBoolPref(kPrefAwayWhenIdle)) {
|
||||
this._idleStatusType = Ci.imIStatusInfo.STATUS_AWAY;
|
||||
this._idleStatusText = Services.prefs.getComplexValue(
|
||||
kPrefDefaultMessage,
|
||||
Ci.nsIPrefLocalizedString
|
||||
).data;
|
||||
|
||||
this._idleStatusText = Services.prefs.prefHasUserValue(
|
||||
kPrefDefaultMessage
|
||||
)
|
||||
? Services.prefs.getCharValue(kPrefDefaultMessage, "")
|
||||
: lazy.l10n.getValueSync("messenger-status-default-away-message");
|
||||
}
|
||||
} else {
|
||||
this.idleTime = 0;
|
||||
|
|
|
@ -5,15 +5,16 @@
|
|||
import { IMServices } from "resource:///modules/IMServices.sys.mjs";
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
import { GenericMessagePrototype } from "resource:///modules/jsProtoHelper.sys.mjs";
|
||||
import { l10nHelper } from "resource:///modules/imXPCOMUtils.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
ToLocaleFormat: "resource:///modules/ToLocaleFormat.sys.mjs",
|
||||
});
|
||||
|
||||
ChromeUtils.defineLazyGetter(lazy, "_", () =>
|
||||
l10nHelper("chrome://chat/locale/logger.properties")
|
||||
ChromeUtils.defineLazyGetter(
|
||||
lazy,
|
||||
"l10n",
|
||||
() => new Localization(["chat/logger.ftl"], true)
|
||||
);
|
||||
|
||||
/*
|
||||
|
@ -696,7 +697,7 @@ class Log {
|
|||
messages.push({
|
||||
who: "sessionstart",
|
||||
date: getDateFromFilename(filename)[0],
|
||||
text: lazy._("badLogfile", filename),
|
||||
text: lazy.l10n.formatValueSync("bad-logfile", { filename }),
|
||||
flags: ["noLog", "notification", "error", "system"],
|
||||
});
|
||||
continue;
|
||||
|
|
|
@ -230,6 +230,7 @@
|
|||
return;
|
||||
}
|
||||
this.textContent = "";
|
||||
MozXULElement.insertFTLIfNeeded("chat/imtooltip.ftl");
|
||||
this.appendChild(
|
||||
MozXULElement.parseXULToFragment(`
|
||||
<vbox class="largeTooltip">
|
||||
|
@ -254,15 +255,6 @@
|
|||
this.initializeAttributeInheritance();
|
||||
}
|
||||
|
||||
get bundle() {
|
||||
if (!this._bundle) {
|
||||
this._bundle = Services.strings.createBundle(
|
||||
"chrome://chat/locale/imtooltip.properties"
|
||||
);
|
||||
}
|
||||
return this._bundle;
|
||||
}
|
||||
|
||||
set buddy(val) {
|
||||
if (val == this._buddy) {
|
||||
return;
|
||||
|
@ -441,10 +433,10 @@
|
|||
);
|
||||
|
||||
if (displayName != name) {
|
||||
this.addRow(this.bundle.GetStringFromName("buddy.username"), name);
|
||||
this.addRow("buddy-username", name, { label: true });
|
||||
}
|
||||
|
||||
this.addRow(this.bundle.GetStringFromName("buddy.account"), account.name);
|
||||
this.addRow("buddy-account", account.name, { label: true });
|
||||
|
||||
if (aBuddy.canVerifyIdentity) {
|
||||
const identityStatus = aBuddy.identityVerified
|
||||
|
@ -458,10 +450,10 @@
|
|||
|
||||
// Add encryption status.
|
||||
if (this.triggerNode.classList.contains("message-encrypted")) {
|
||||
this.addRow(
|
||||
this.bundle.GetStringFromName("encryption.tag"),
|
||||
this.bundle.GetStringFromName("message.status")
|
||||
);
|
||||
this.addRow("encryption-tag", "message-status", {
|
||||
label: true,
|
||||
value: true,
|
||||
});
|
||||
}
|
||||
|
||||
this.requestBuddyInfo(account, aBuddy.normalizedName);
|
||||
|
@ -538,7 +530,7 @@
|
|||
// with aConv.normalizedName.
|
||||
this.requestBuddyInfo(account, aConv.normalizedName);
|
||||
}
|
||||
this.addRow(this.bundle.GetStringFromName("buddy.account"), account.name);
|
||||
this.addRow("buddy-account", account.name, { label: true });
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
# LOCALIZATION NOTE (password-prompt-title, password-prompt-text):
|
||||
# $accountName (String): is replaced with the name of the account
|
||||
password-prompt-title = Password for { $accountName }
|
||||
# $accountName (String): is replaced with the name of the account
|
||||
password-prompt-text = Please enter your password for { $accountName } in order to connect it.
|
||||
password-prompt-save-checkbox = Use Password Manager to remember this password.
|
|
@ -1,9 +0,0 @@
|
|||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
# LOCALIZATION NOTE (passwordPromptTitle, passwordPromptText):
|
||||
# %S is replaced with the name of the account
|
||||
passwordPromptTitle=Password for %S
|
||||
passwordPromptText=Please enter your password for %S in order to connect it.
|
||||
passwordPromptSaveCheckbox=Use Password Manager to remember this password.
|
|
@ -0,0 +1,28 @@
|
|||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
# LOCALIZATION NOTE (commands-key):
|
||||
# $command (String): is a comma separated list of command names.
|
||||
commands-key =
|
||||
Commands: { $command }.
|
||||
Use /help <command> for more information.
|
||||
# LOCALIZATION NOTE (no-command, no-help-key):
|
||||
# $command (String): is the command name the user typed.
|
||||
no-command = No '{ $command }' command.
|
||||
# $command (String): is the command name the user typed.
|
||||
no-help-key = No help message for the '{ $command }' command, sorry!
|
||||
|
||||
say-help-string = say <message>: send a message without processing commands.
|
||||
raw-help-string = raw <message>: send a message without escaping HTML entities.
|
||||
help-help-string = help <name>: show the help message for the <name> command, or the list of possible commands when used without parameter.
|
||||
|
||||
# LOCALIZATION NOTE (status-command):
|
||||
# $command (String): is replaced with a status command name (one of "back-key-key", "away-key-key", "busy-key-key", "dnd-key-key", or "offline-key-key").
|
||||
# $status (String): is replaced with the localized version of that status type (one of the 5 strings below).
|
||||
status-command = { $command } <status message>: set the status to { $status } with an optional status message.
|
||||
back-key-key = available
|
||||
away-key-key = away
|
||||
busy-key-key = unavailable
|
||||
dnd-key-key = unavailable
|
||||
offline-key-key = offline
|
|
@ -1,27 +0,0 @@
|
|||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
# LOCALIZATION NOTE (commands):
|
||||
# %S is a comma separated list of command names.
|
||||
commands=Commands: %S.\nUse /help <command> for more information.
|
||||
# LOCALIZATION NOTE (noCommand, noHelp):
|
||||
# %S is the command name the user typed.
|
||||
noCommand=No '%S' command.
|
||||
noHelp=No help message for the '%S' command, sorry!
|
||||
|
||||
sayHelpString=say <message>: send a message without processing commands.
|
||||
rawHelpString=raw <message>: send a message without escaping HTML entities.
|
||||
helpHelpString=help <name>: show the help message for the <name> command, or the list of possible commands when used without parameter.
|
||||
|
||||
# LOCALIZATION NOTE (statusCommand):
|
||||
# %1$S is replaced with a status command name
|
||||
# (one of "back", "away", "busy", "dnd", or "offline").
|
||||
# %2$S is replaced with the localized version of that status type
|
||||
# (one of the 5 strings below).
|
||||
statusCommand=%1$S <status message>: set the status to %2$S with an optional status message.
|
||||
back=available
|
||||
away=away
|
||||
busy=unavailable
|
||||
dnd=unavailable
|
||||
offline=offline
|
|
@ -2,7 +2,7 @@
|
|||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
# LOCALIZATION NOTE (defaultGroup):
|
||||
# LOCALIZATION NOTE (default-group):
|
||||
# This is the name of the group that will automatically be created when adding a
|
||||
# buddy without specifying a group.
|
||||
defaultGroup=Contacts
|
||||
default-group = Contacts
|
|
@ -0,0 +1,98 @@
|
|||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
# LOCALIZATION NOTE (target-changed):
|
||||
# $targetName is the new conversation title (display name of the new target),
|
||||
# $targetProtocol is the protocol name used for the new target.
|
||||
target-changed = The conversation will continue with { $targetName }, using { $targetProtocol }.
|
||||
|
||||
# LOCALIZATION NOTE (status-changed):
|
||||
# $displayName is the display name of the contact.
|
||||
# $statusType is the new status type (a value from status.ftl).
|
||||
status-changed = { $displayName } is now { $statusType }.
|
||||
|
||||
# LOCALIZATION NOTE (status-changed-with-status-text):
|
||||
# $displayName is the display name of the contact.
|
||||
# $statusType is the new status type (a value from status.ftl).
|
||||
# $statusText is the status text (eg. "I'm currently away from the computer").
|
||||
status-changed-with-status-text = { $displayName } is now { $statusType }: { $statusText }.
|
||||
|
||||
# LOCALIZATION NOTE (status-changed-from-unknown[-with-status-text]):
|
||||
# special case of the previous 2 strings for when the status was
|
||||
# previously unknown. These 2 strings should not mislead the user
|
||||
# into thinking the person's status has just changed.
|
||||
# $displayName is the display name of the contact.
|
||||
# $statusType is the new status type (a value from status.ftl).
|
||||
status-changed-from-unknown = { $displayName } is { $statusType }.
|
||||
# $displayName is the display name of the contact.
|
||||
# $statusType is the new status type (a value from status.ftl).
|
||||
# $statusText is the status text (eg. "I'm currently away from the computer").
|
||||
status-changed-from-unknown-with-status-text = { $displayName } is { $statusType }: { $statusText }.
|
||||
|
||||
# LOCALIZATION NOTE (status-known[-with-status-text]):
|
||||
# special case of the previous 2 strings for when an account has just
|
||||
# been reconnected, so the status is now known. These 2 strings should not
|
||||
# mislead the user into thinking the person's status has just changed.
|
||||
# $displayName is the display name of the contact.
|
||||
# $statusType is the new status type (a value from status.ftl).
|
||||
status-known = Your account has been reconnected ({ $displayName } is { $statusType }).
|
||||
# $displayName is the display name of the contact.
|
||||
# $statusType is the new status type (a value from status.ftl).
|
||||
# $statusText is the status text (eg. "I'm currently away from the computer").
|
||||
status-known-with-status-text = Your account has been reconnected ({ $displayName } is { $statusType }: { $statusText }).
|
||||
|
||||
# LOCALIZATION NOTE (status-unknown):
|
||||
# $displayName is the display name of the contact.
|
||||
status-unknown = Your account is disconnected (the status of { $displayName } is no longer known).
|
||||
|
||||
account-disconnected = Your account is disconnected.
|
||||
account-reconnected = Your account has been reconnected.
|
||||
|
||||
# LOCALIZATION NOTE (auto-reply):
|
||||
# $message is replaced by the text of a message that was sent as an automatic reply.
|
||||
auto-reply = Auto-reply - { $message }
|
||||
|
||||
# LOCALIZATION NOTE (no-topic-key):
|
||||
# Displayed instead of the topic when no topic is set.
|
||||
no-topic-key = No topic message for this room.
|
||||
|
||||
# LOCALIZATION NOTE (topic-set):
|
||||
# $conversationName is the conversation name, $topic is the topic.
|
||||
topic-set = The topic for { $conversationName } is: { $topic }.
|
||||
|
||||
# LOCALIZATION NOTE (topic-not-set):
|
||||
# $conversationName is the conversation name.
|
||||
topic-not-set = There is no topic for { $conversationName }.
|
||||
|
||||
# LOCALIZATION NOTE (topic-changed):
|
||||
# $user is the user who changed the topic, $topic is the new topic.
|
||||
topic-changed = { $user } has changed the topic to: { $topic }.
|
||||
|
||||
# LOCALIZATION NOTE (topic-cleared):
|
||||
# $user is the user who cleared the topic.
|
||||
topic-cleared = { $user } has cleared the topic.
|
||||
|
||||
# LOCALIZATION NOTE (nick-set-key):
|
||||
# This is displayed as a system message when a participant changes his/her
|
||||
# nickname in a conversation.
|
||||
# $oldNick is the old nick.
|
||||
# $newNick is the new nick.
|
||||
nick-set-key = { $oldNick } is now known as { $newNick }.
|
||||
|
||||
# LOCALIZATION NOTE (nick-set-you):
|
||||
# This is displayed as a system message when your nickname is changed.
|
||||
# $newNick is your new nick.
|
||||
nick-set-you = You are now known as { $newNick }.
|
||||
|
||||
# LOCALIZATION NOTE (messenger-conversations-selections-ellipsis):
|
||||
# ellipsis is used when copying a part of a message to show that the message was cut
|
||||
messenger-conversations-selections-ellipsis = […]
|
||||
|
||||
# LOCALIZATION NOTE (messenger-conversations-selections-system-[system,content,action]-messages-template):
|
||||
# These 3 templates are used to format selected messages before copying them.
|
||||
# Do not translate the texts between left and right brace characters, but feel free to adjust
|
||||
# whitespace and separators to make them fit your locale.
|
||||
messenger-conversations-selections-system-messages-template = %time% - %message%
|
||||
messenger-conversations-selections-content-messages-template = %time% - %sender%: %message%
|
||||
messenger-conversations-selections-action-messages-template = %time% * %sender% %message%
|
|
@ -1,80 +0,0 @@
|
|||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
# LOCALIZATION NOTE (targetChanged):
|
||||
# %1$S is the new conversation title (display name of the new target),
|
||||
# %2$S is the protocol name used for the new target.
|
||||
targetChanged=The conversation will continue with %1$S, using %2$S.
|
||||
|
||||
# LOCALIZATION NOTE (statusChanged):
|
||||
# %1$S is the display name of the contact.
|
||||
# %2$S is the new status type (a value from status.properties).
|
||||
statusChanged=%1$S is now %2$S.
|
||||
# LOCALIZATION NOTE (statusChangedWithStatusText):
|
||||
# %1$S is the display name of the contact.
|
||||
# %2$S is the new status type (a value from status.properties).
|
||||
# %3$S is the status text (eg. "I'm currently away from the computer").
|
||||
statusChangedWithStatusText=%1$S is now %2$S: %3$S.
|
||||
# LOCALIZATION NOTE (statusChangedFromUnknown[WithStatusText]):
|
||||
# special case of the previous 2 strings for when the status was
|
||||
# previously unknown. These 2 strings should not mislead the user
|
||||
# into thinking the person's status has just changed.
|
||||
statusChangedFromUnknown=%1$S is %2$S.
|
||||
statusChangedFromUnknownWithStatusText=%1$S is %2$S: %3$S.
|
||||
# LOCALIZATION NOTE (statusKnown[WithStatusText]):
|
||||
# special case of the previous 2 strings for when an account has just
|
||||
# been reconnected, so the status is now known. These 2 strings should not
|
||||
# mislead the user into thinking the person's status has just changed.
|
||||
statusKnown=Your account has been reconnected (%1$S is %2$S).
|
||||
statusKnownWithStatusText=Your account has been reconnected (%1$S is %2$S: %3$S).
|
||||
# LOCALIZATION NOTE (statusUnknown):
|
||||
# %S is the display name of the contact.
|
||||
statusUnknown=Your account is disconnected (the status of %S is no longer known).
|
||||
|
||||
accountDisconnected=Your account is disconnected.
|
||||
accountReconnected=Your account has been reconnected.
|
||||
|
||||
# LOCALIZATION NOTE (autoReply):
|
||||
# %S is replaced by the text of a message that was sent as an automatic reply.
|
||||
autoReply=Auto-reply - %S
|
||||
|
||||
# LOCALIZATION NOTE (noTopic):
|
||||
# Displayed instead of the topic when no topic is set.
|
||||
noTopic=No topic message for this room.
|
||||
|
||||
# LOCALIZATION NOTE (topicSet):
|
||||
# %1$S is the conversation name, %2$S is the topic.
|
||||
topicSet=The topic for %1$S is: %2$S.
|
||||
# LOCALIZATION NOTE (topicNotSet):
|
||||
# %S is the conversation name.
|
||||
topicNotSet=There is no topic for %S.
|
||||
# LOCALIZATION NOTE (topicChanged):
|
||||
# %1$S is the user who changed the topic, %2$S is the new topic.
|
||||
topicChanged=%1$S has changed the topic to: %2$S.
|
||||
# LOCALIZATION NOTE (topicCleared):
|
||||
# %1$S is the user who cleared the topic.
|
||||
topicCleared=%1$S has cleared the topic.
|
||||
|
||||
# LOCALIZATION NOTE (nickSet):
|
||||
# This is displayed as a system message when a participant changes his/her
|
||||
# nickname in a conversation.
|
||||
# %1$S is the old nick.
|
||||
# %2$S is the new nick.
|
||||
nickSet=%1$S is now known as %2$S.
|
||||
# LOCALIZATION NOTE (nickSet.you):
|
||||
# This is displayed as a system message when your nickname is changed.
|
||||
# %S is your new nick.
|
||||
nickSet.you=You are now known as %S.
|
||||
|
||||
# LOCALIZATION NOTE (messenger.conversations.selections.ellipsis):
|
||||
# ellipsis is used when copying a part of a message to show that the message was cut
|
||||
messenger.conversations.selections.ellipsis=[…]
|
||||
|
||||
# LOCALIZATION NOTE (messenger.conversations.selections.{system,content,action}MessagesTemplate):
|
||||
# These 3 templates are used to format selected messages before copying them.
|
||||
# Do not translate the texts between % characters, but feel free to adjust
|
||||
# whitespace and separators to make them fit your locale.
|
||||
messenger.conversations.selections.systemMessagesTemplate=%time% - %message%
|
||||
messenger.conversations.selections.contentMessagesTemplate=%time% - %sender%: %message%
|
||||
messenger.conversations.selections.actionMessagesTemplate=%time% * %sender% %message%
|
|
@ -2,5 +2,5 @@
|
|||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
facebook.chat.name=Facebook Chat
|
||||
facebook.disabled=Facebook Chat is no longer supported due to Facebook disabling their XMPP gateway.
|
||||
facebook-chat-name = Facebook Chat
|
||||
facebook-disabled = Facebook Chat is no longer supported due to Facebook disabling their XMPP gateway.
|
|
@ -2,9 +2,9 @@
|
|||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
buddy.username=Username
|
||||
buddy.account=Account
|
||||
contact.tags=Tags
|
||||
buddy-username = Username
|
||||
buddy-account = Account
|
||||
contact-tags = Tags
|
||||
|
||||
encryption.tag=Encryption Status
|
||||
message.status=Message encrypted
|
||||
encryption-tag = Encryption Status
|
||||
message-status = Message encrypted
|
|
@ -0,0 +1,283 @@
|
|||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
# LOCALIZATION NOTE (irc-username-hint):
|
||||
# This is displayed inside the accountUsernameInfoWithDescription
|
||||
# string defined in imAccounts.properties when the user is
|
||||
# configuring an IRC account.
|
||||
irc-username-hint = nick
|
||||
|
||||
# LOCALIZATION NOTE (connection-error-*):
|
||||
# These will show in the account manager if the account is
|
||||
# disconnected because of an error.
|
||||
connection-error-lost = Lost connection with server
|
||||
connection-error-time-out = Connection timed out
|
||||
# $username (String) username
|
||||
connection-error-invalid-username = { $username } is not an allowed username
|
||||
connection-error-invalid-password = Invalid server password
|
||||
connection-error-password-required = Password required
|
||||
|
||||
# LOCALIZATION NOTE (join-chat-*):
|
||||
# These show up on the join chat menu. An underscore is for the access key.
|
||||
join-chat-channel = _Channel
|
||||
join-chat-password = _Password
|
||||
|
||||
# LOCALIZATION NOTE (options-*):
|
||||
# These are the protocol specific options shown in the account manager and
|
||||
# account wizard windows.
|
||||
options-server = Server
|
||||
options-port = Port
|
||||
options-ssl = Use SSL
|
||||
options-encoding = Character Set
|
||||
options-quit-message = Quit message
|
||||
options-part-message = Part message
|
||||
options-show-server-tab = Show messages from the server
|
||||
options-alternate-nicks = Alternate nicks
|
||||
|
||||
# LOCALIZATION NOTE (ctcp-version):
|
||||
# $username is the nickname of the user whose version was requested.
|
||||
# $version is the version response from the client.
|
||||
ctcp-version = { $username } is using "{ $version }".
|
||||
# LOCALIZATION NOTE (ctcp-time):
|
||||
# $username is the nickname of the user whose time was requested.
|
||||
# $timeResponse is the time response.
|
||||
ctcp-time = The time for { $username } is { $timeResponse }.
|
||||
|
||||
# LOCALIZATION NOTE (command-*):
|
||||
# These are the help messages for each command, the $commandName is the command name
|
||||
# Each command first gives the parameter it accepts and then a description of
|
||||
# the command.
|
||||
command-action = { $commandName } <action to perform>: Perform an action.
|
||||
# $commandName is the command name
|
||||
command-ban = { $commandName } <nick!user@host>: Ban the users matching the given pattern.
|
||||
# $commandName is the command name
|
||||
command-ctcp = { $commandName } <nick> <msg>: Sends a CTCP message to the nick.
|
||||
# $commandName is the command name
|
||||
command-chanserv = { $commandName } <command>: Send a command to ChanServ.
|
||||
# $commandName is the command name
|
||||
command-deop = { $commandName } <nick1>[,<nick2>]*: Remove channel operator status from someone. You must be a channel operator to do this.
|
||||
# $commandName is the command name
|
||||
command-devoice = { $commandName } <nick1>[,<nick2>]*: Remove channel voice status from someone, preventing them from speaking if the channel is moderated (+m). You must be a channel operator to do this.
|
||||
# $commandName is the command name
|
||||
command-invite2 = { $commandName } <nick>[ <nick>]* [<channel>]: Invite one or more nicks to join you in the current channel, or to join the specified channel.
|
||||
# $commandName is the command name
|
||||
command-join = { $commandName } <room1>[ <key1>][,<room2>[ <key2>]]*: Enter one or more channels, optionally providing a channel key for each if needed.
|
||||
# $commandName is the command name
|
||||
command-kick = { $commandName } <nick> [<message>]: Remove someone from a channel. You must be a channel operator to do this.
|
||||
# $commandName is the command name
|
||||
command-list = { $commandName }: Display a list of chat rooms on the network. Warning, some servers may disconnect you upon doing this.
|
||||
# $commandName is the command name
|
||||
command-memoserv = { $commandName } <command>: Send a command to MemoServ.
|
||||
# $commandName is the command name
|
||||
command-mode-user2 = { $commandName } <nick> [(+|-)<mode>]: Get, set or unset a user's mode.
|
||||
# $commandName is the command name
|
||||
command-mode-channel2 = { $commandName } [<channel>] [(+|-)<new mode> [<parameter>][,<parameter>]*]: Get, set, or unset a channel mode.
|
||||
# $commandName is the command name
|
||||
command-msg = { $commandName } <nick> <message>: Send a private message to a user (as opposed to a channel).
|
||||
# $commandName is the command name
|
||||
command-nick = { $commandName } <new nickname>: Change your nickname.
|
||||
# $commandName is the command name
|
||||
command-nickserv = { $commandName } <command>: Send a command to NickServ.
|
||||
# $commandName is the command name
|
||||
command-notice = { $commandName } <target> <message>: Send a notice to a user or channel.
|
||||
# $commandName is the command name
|
||||
command-op = { $commandName } <nick1>[,<nick2>]*: Grant channel operator status to someone. You must be a channel operator to do this.
|
||||
# $commandName is the command name
|
||||
command-operserv = { $commandName } <command>: Send a command to OperServ.
|
||||
# $commandName is the command name
|
||||
command-part = { $commandName } [message]: Leave the current channel with an optional message.
|
||||
# $commandName is the command name
|
||||
command-ping = { $commandName } [<nick>]: Asks how much lag a user (or the server if no user specified) has.
|
||||
# $commandName is the command name
|
||||
command-quit = { $commandName } <message>: Disconnect from the server, with an optional message.
|
||||
# $commandName is the command name
|
||||
command-quote = { $commandName } <command>: Send a raw command to the server.
|
||||
# $commandName is the command name
|
||||
command-time = { $commandName }: Displays the current local time at the IRC server.
|
||||
# $commandName is the command name
|
||||
command-topic = { $commandName } [<new topic>]: Set this channel's topic.
|
||||
# $commandName is the command name
|
||||
command-umode = { $commandName } (+|-)<new mode>: Set or unset a user mode.
|
||||
# $commandName is the command name
|
||||
command-version = { $commandName } <nick>: Request the version of a user's client.
|
||||
# $commandName is the command name
|
||||
command-voice = { $commandName } <nick1>[,<nick2>]*: Grant channel voice status to someone. You must be a channel operator to do this.
|
||||
# $commandName is the command name
|
||||
command-whois2 = { $commandName } [<nick>]: Get information on a user.
|
||||
|
||||
# LOCALIZATION NOTE (message-*):
|
||||
# These are shown as system messages in the conversation.
|
||||
# $nick is the nick and $nickAndHost is the nick and host of the user who joined.
|
||||
message-join = { $nick } [{ $nickAndHost }] entered the room.
|
||||
message-rejoined = You have rejoined the room.
|
||||
|
||||
# $nick is the nick of who kicked you.
|
||||
# $messageKickedReason is message-kicked-reason, if a kick message was given.
|
||||
message-kicked-you = You have been kicked by { $nick }{ $messageKickedReason }.
|
||||
|
||||
# $kickedNick is the nick that is kicked, $kickerNick the nick of the person who kicked
|
||||
# $kickedNick. $messageKickedReason is message-kicked-reason, if a kick message was given.
|
||||
message-kicked = { $kickedNick } has been kicked by { $kickerNick }{ $messageKickedReason }.
|
||||
|
||||
# $kickMessage is the kick message
|
||||
message-kicked-reason = : { $kickMessage }
|
||||
|
||||
# $mode is the new mode, $targetUser is the nickname of the user whose mode
|
||||
# was changed, and $sourceUser is who set the mode.
|
||||
message-usermode = Mode { $mode } for { $targetUser } set by { $sourceUser }.
|
||||
|
||||
# $mode is the new channel mode and $user is who set the mode.
|
||||
message-channelmode = Channel mode { $mode } set by { $user }.
|
||||
|
||||
# $mode is the user's mode.
|
||||
message-yourmode = Your mode is { $mode }.
|
||||
|
||||
# Could not change the nickname. $nick is the user's nick.
|
||||
message-nick-fail = Could not use the desired nickname. Your nick remains { $nick }.
|
||||
|
||||
# $messagePartedReason (String) The parameter is the message-parted-reason, if a part message is given.
|
||||
message-parted-you = You have left the room (Part{ $messagePartedReason }).
|
||||
|
||||
# $messagePartedReason (String) The parameter is the message-parted-reason, if a part message is given.
|
||||
# $partMessage (String) is the message-parted-reason, if a part message is given.
|
||||
message-parted = { $messagePartedReason } has left the room (Part{ $partMessage }).
|
||||
|
||||
# $partMessage is the part message supplied by the user.
|
||||
message-parted-reason = : { $partMessage }
|
||||
|
||||
# $nick is the user's nick, $quitMessage is message-quit2 if a quit message is given.
|
||||
message-quit = { $nick } has left the room (Quit{ $quitMessage }).
|
||||
|
||||
# $nick is the user's nick
|
||||
message-quit2 = : { $nick }
|
||||
|
||||
# $nick is the nickname of the user that invited us, $conversationName is the conversation
|
||||
# name.
|
||||
message-invite-received = { $nick } has invited you to { $conversationName }.
|
||||
|
||||
# $nick is the nickname of the invited user, $conversationName is the conversation name
|
||||
# they were invited to.
|
||||
message-invited = { $nick } was successfully invited to { $conversationName }.
|
||||
|
||||
# $nick is the nickname of the invited user, $conversationName is the conversation name
|
||||
# they were invited to but are already in
|
||||
message-already-in-channel = { $nick } is already in { $conversationName }.
|
||||
|
||||
# $nick is the nickname of the user who was summoned.
|
||||
message-summoned = { $nick } was summoned.
|
||||
|
||||
# $nick (String) is the nickname of the user whose WHOIS information follows this message.
|
||||
message-whois = WHOIS information for { $nick }:
|
||||
|
||||
# $nick (String) is the nickname of the (offline) user whose WHOWAS information follows this message.
|
||||
message-whowas = { $nick } is offline. WHOWAS information for { $nick }:
|
||||
|
||||
# $description is the entry description (from tooltip-*), $value is its value.
|
||||
message-whois-entry = { $description }: { $value }
|
||||
|
||||
# $nick is the nickname that is not known to the server.
|
||||
message-unknown-nick = { $nick } is an unknown nickname.
|
||||
|
||||
# $nick is the nickname of the user who changed the mode and $newPassword is the new
|
||||
# channel key (password).
|
||||
message-channel-key-added = { $nick } changed the channel password to { $newPassword }.
|
||||
# $nick is the nickname of the user who changed the mode
|
||||
message-channel-key-removed = { $nick } removed the channel password.
|
||||
|
||||
# $place This will be followed by a list of ban masks.
|
||||
message-ban-masks = Users connected from the following locations are banned from { $place }:
|
||||
# $place This will be followed by a list of ban masks.
|
||||
message-no-ban-masks = There are no banned locations for { $place }.
|
||||
|
||||
# $locationMatches Location matches; $nick Nickname of user
|
||||
message-ban-mask-added = Users connected from locations matching { $locationMatches } have been banned by { $nick }.
|
||||
# $locationMatches Location matches; $nick Nickname of user
|
||||
message-ban-mask-removed = Users connected from locations matching { $locationMatches } are no longer banned by { $nick }.
|
||||
|
||||
# $source is the nickname of the user or the server that was pinged.
|
||||
# $delay is the delay (in milliseconds).
|
||||
message-ping =
|
||||
{ $delay ->
|
||||
[one] Ping reply from { $source } in { $delay } millisecond.
|
||||
*[other] Ping reply from { $source } in { $delay } milliseconds.
|
||||
}
|
||||
|
||||
# LOCALIZATION NOTE (error-*):
|
||||
# These are shown as error messages in the conversation or server tab.
|
||||
# $name is the channel name.
|
||||
error-no-channel = There is no channel: { $name }.
|
||||
# $name is the channel name.
|
||||
error-too-many-channels = Cannot join { $name }; you've joined too many channels.
|
||||
# $name is your new nick, $details is the kill message from the server.
|
||||
error-nick-collision = Nick already in use, changing nick to { $name } [{ $details }].
|
||||
|
||||
# $name is the nickname or channel name that isn't available.
|
||||
error-erroneous-nickname = { $name } is not an allowed nickname.
|
||||
error-banned = You are banned from this server.
|
||||
error-banned-soon = You will soon be banned from this server.
|
||||
error-mode-wrong-user = You cannot change modes for other users.
|
||||
|
||||
# $name is the nickname or channel name that isn't available.
|
||||
error-no-such-nick = { $name } is not online.
|
||||
# $name is the nickname or channel name that isn't available.
|
||||
error-was-no-such-nick = There was no nickname: { $name }
|
||||
# $name is the nickname or channel name that isn't available.
|
||||
error-no-such-channel = There is no channel: { $name }.
|
||||
# $name is the nickname or channel name that isn't available.
|
||||
error-unavailable = { $name } is temporarily unavailable.
|
||||
|
||||
# $name is the channel name.
|
||||
error-channel-banned = You have been banned from { $name }.
|
||||
# $name is the channel name.
|
||||
error-cannot-send-to-channel = You cannot send messages to { $name }.
|
||||
# $name is the channel name.
|
||||
error-channel-full = The channel { $name } is full.
|
||||
# $name is the channel name.
|
||||
error-invite-only = You must be invited to join { $name }.
|
||||
# $name is the channel name.
|
||||
error-non-unique-target = { $name } is not a unique user@host or shortname or you have tried to join too many channels at once.
|
||||
# $name is the channel name.
|
||||
error-not-channel-op = You are not a channel operator on { $name }.
|
||||
# $name is the channel name.
|
||||
error-not-channel-owner = You are not a channel owner of { $name }.
|
||||
# $name is the channel name.
|
||||
error-wrong-key = Cannot join { $name }, invalid channel password.
|
||||
error-send-message-failed = An error occurred while sending your last message. Please try again once the connection has been reestablished.
|
||||
# $name is the channel the user tried to join, $details is the channel
|
||||
# he was forwarded to.
|
||||
error-channel-forward = You may not join { $name }, and were automatically redirected to { $details }.
|
||||
# $mode is the mode that the user tried to set but was not recognized
|
||||
# by the server as a valid mode.
|
||||
error-unknown-mode = '{ $mode }' is not a valid user mode on this server.
|
||||
|
||||
# LOCALIZATION NOTE (tooltip-*):
|
||||
# These are the descriptions given in a tooltip with information received
|
||||
# from a whois response.
|
||||
# The human readable ("realname") description of the user.
|
||||
tooltip-realname = Name
|
||||
tooltip-server = Connected to
|
||||
# The username and hostname that the user connects from (usually based on the
|
||||
# reverse DNS of the user's IP, but often mangled by the server to
|
||||
# protect users).
|
||||
tooltip-connected-from = Connected from
|
||||
tooltip-registered = Registered
|
||||
tooltip-registered-as = Registered as
|
||||
tooltip-secure = Using a secure connection
|
||||
# The away message of the user
|
||||
tooltip-away = Away
|
||||
tooltip-irc-op = IRC Operator
|
||||
tooltip-bot = Bot
|
||||
tooltip-last-activity = Last activity
|
||||
# $timespan is the timespan elapsed since the last activity.
|
||||
tooltip-timespan = { $timespan } ago
|
||||
tooltip-channels = Currently on
|
||||
|
||||
# $serverName is the server name, $serverInformation is some generic server information (usually a
|
||||
# location or the date the user was last seen).
|
||||
tooltip-server-value = { $serverName } ({ $serverInformation })
|
||||
|
||||
# LOCALIZATION NOTE (yes-key-key, no-key-key):
|
||||
# These are used to turn true/false values into a yes-key-key/no-key-key response.
|
||||
yes-key-key = Yes
|
||||
no-key-key = No
|
|
@ -1,210 +0,0 @@
|
|||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
# LOCALIZATION NOTE (irc.usernameHint):
|
||||
# This is displayed inside the accountUsernameInfoWithDescription
|
||||
# string defined in imAccounts.properties when the user is
|
||||
# configuring an IRC account.
|
||||
irc.usernameHint=nick
|
||||
|
||||
# LOCALIZATION NOTE (connection.error.*):
|
||||
# These will show in the account manager if the account is
|
||||
# disconnected because of an error.
|
||||
connection.error.lost=Lost connection with server
|
||||
connection.error.timeOut=Connection timed out
|
||||
connection.error.invalidUsername=%S is not an allowed username
|
||||
connection.error.invalidPassword=Invalid server password
|
||||
connection.error.invalidUserPassword=Invalid password
|
||||
connection.error.passwordRequired=Password required
|
||||
|
||||
# LOCALIZATION NOTE (joinChat.*):
|
||||
# These show up on the join chat menu. An underscore is for the access key.
|
||||
joinChat.channel=_Channel
|
||||
joinChat.password=_Password
|
||||
|
||||
# LOCALIZATION NOTE (options.*):
|
||||
# These are the protocol specific options shown in the account manager and
|
||||
# account wizard windows.
|
||||
options.server=Server
|
||||
options.port=Port
|
||||
options.ssl=Use SSL
|
||||
options.encoding=Character Set
|
||||
options.quitMessage=Quit message
|
||||
options.partMessage=Part message
|
||||
options.showServerTab=Show messages from the server
|
||||
options.alternateNicks=Alternate nicks
|
||||
|
||||
# LOCALIZATION NOTE (ctcp.version):
|
||||
# %1$S is the nickname of the user whose version was requested.
|
||||
# %2$S is the version response from the client.
|
||||
ctcp.version=%1$S is using "%2$S".
|
||||
# LOCALIZATION NOTE (ctcp.time):
|
||||
# %1$S is the nickname of the user whose time was requested.
|
||||
# %2$S is the time response.
|
||||
ctcp.time=The time for %1$S is %2$S.
|
||||
|
||||
# LOCALZIATION NOTE (command.*):
|
||||
# These are the help messages for each command, the %S is the command name
|
||||
# Each command first gives the parameter it accepts and then a description of
|
||||
# the command.
|
||||
command.action=%S <action to perform>: Perform an action.
|
||||
command.ban=%S <nick!user@host>: Ban the users matching the given pattern.
|
||||
command.ctcp=%S <nick> <msg>: Sends a CTCP message to the nick.
|
||||
command.chanserv=%S <command>: Send a command to ChanServ.
|
||||
command.deop=%S <nick1>[,<nick2>]*: Remove channel operator status from someone. You must be a channel operator to do this.
|
||||
command.devoice=%S <nick1>[,<nick2>]*: Remove channel voice status from someone, preventing them from speaking if the channel is moderated (+m). You must be a channel operator to do this.
|
||||
command.invite2=%S <nick>[ <nick>]* [<channel>]: Invite one or more nicks to join you in the current channel, or to join the specified channel.
|
||||
command.join=%S <room1>[ <key1>][,<room2>[ <key2>]]*: Enter one or more channels, optionally providing a channel key for each if needed.
|
||||
command.kick=%S <nick> [<message>]: Remove someone from a channel. You must be a channel operator to do this.
|
||||
command.list=%S: Display a list of chat rooms on the network. Warning, some servers may disconnect you upon doing this.
|
||||
command.memoserv=%S <command>: Send a command to MemoServ.
|
||||
command.modeUser2=%S <nick> [(+|-)<mode>]: Get, set or unset a user's mode.
|
||||
command.modeChannel2=%S [<channel>] [(+|-)<new mode> [<parameter>][,<parameter>]*]: Get, set, or unset a channel mode.
|
||||
command.msg=%S <nick> <message>: Send a private message to a user (as opposed to a channel).
|
||||
command.nick=%S <new nickname>: Change your nickname.
|
||||
command.nickserv=%S <command>: Send a command to NickServ.
|
||||
command.notice=%S <target> <message>: Send a notice to a user or channel.
|
||||
command.op=%S <nick1>[,<nick2>]*: Grant channel operator status to someone. You must be a channel operator to do this.
|
||||
command.operserv=%S <command>: Send a command to OperServ.
|
||||
command.part=%S [message]: Leave the current channel with an optional message.
|
||||
command.ping=%S [<nick>]: Asks how much lag a user (or the server if no user specified) has.
|
||||
command.quit=%S <message>: Disconnect from the server, with an optional message.
|
||||
command.quote=%S <command>: Send a raw command to the server.
|
||||
command.time=%S: Displays the current local time at the IRC server.
|
||||
command.topic=%S [<new topic>]: Set this channel's topic.
|
||||
command.umode=%S (+|-)<new mode>: Set or unset a user mode.
|
||||
command.version=%S <nick>: Request the version of a user's client.
|
||||
command.voice=%S <nick1>[,<nick2>]*: Grant channel voice status to someone. You must be a channel operator to do this.
|
||||
command.whois2=%S [<nick>]: Get information on a user.
|
||||
|
||||
# LOCALIZATION NOTE (message.*):
|
||||
# These are shown as system messages in the conversation.
|
||||
# %1$S is the nick and %2$S is the nick and host of the user who joined.
|
||||
message.join=%1$S [%2$S] entered the room.
|
||||
message.rejoined=You have rejoined the room.
|
||||
# %1$S is the nick of who kicked you.
|
||||
# %2$S is message.kicked.reason, if a kick message was given.
|
||||
message.kicked.you=You have been kicked by %1$S%2$S.
|
||||
# %1$S is the nick that is kicked, %2$S the nick of the person who kicked
|
||||
# %1$S. %3$S is message.kicked.reason, if a kick message was given.
|
||||
message.kicked=%1$S has been kicked by %2$S%3$S.
|
||||
# %S is the kick message
|
||||
message.kicked.reason=: %S
|
||||
# %1$S is the new mode, %2$S is the nickname of the user whose mode
|
||||
# was changed, and %3$S is who set the mode.
|
||||
message.usermode=Mode %1$S for %2$S set by %3$S.
|
||||
# %1$S is the new channel mode and %2$S is who set the mode.
|
||||
message.channelmode=Channel mode %1$S set by %2$S.
|
||||
# %S is the user's mode.
|
||||
message.yourmode=Your mode is %S.
|
||||
# Could not change the nickname. %S is the user's nick.
|
||||
message.nick.fail=Could not use the desired nickname. Your nick remains %S.
|
||||
# The parameter is the message.parted.reason, if a part message is given.
|
||||
message.parted.you=You have left the room (Part%1$S).
|
||||
# %1$S is the user's nick, %2$S is message.parted.reason, if a part message is given.
|
||||
message.parted=%1$S has left the room (Part%2$S).
|
||||
# %S is the part message supplied by the user.
|
||||
message.parted.reason=: %S
|
||||
# %1$S is the user's nick, %2$S is message.quit2 if a quit message is given.
|
||||
message.quit=%1$S has left the room (Quit%2$S).
|
||||
# The parameter is the quit message given by the user.
|
||||
message.quit2=: %S
|
||||
# %1$S is the nickname of the user that invited us, %2$S is the conversation
|
||||
# name.
|
||||
message.inviteReceived=%1$S has invited you to %2$S.
|
||||
# %1$S is the nickname of the invited user, %2$S is the conversation name
|
||||
# they were invited to.
|
||||
message.invited=%1$S was successfully invited to %2$S.
|
||||
# %1$S is the nickname of the invited user, %2$S is the conversation name
|
||||
# they were invited to but are already in
|
||||
message.alreadyInChannel=%1$S is already in %2$S.
|
||||
# %S is the nickname of the user who was summoned.
|
||||
message.summoned=%S was summoned.
|
||||
# %S is the nickname of the user whose WHOIS information follows this message.
|
||||
message.whois=WHOIS information for %S:
|
||||
# %1$S is the nickname of the (offline) user whose WHOWAS information follows this message.
|
||||
message.whowas=%1$S is offline. WHOWAS information for %1$S:
|
||||
# %1$S is the entry description (from tooltip.*), %2$S is its value.
|
||||
message.whoisEntry=\ua0\ua0\ua0\ua0%1$S: %2$S
|
||||
# %S is the nickname that is not known to the server.
|
||||
message.unknownNick=%S is an unknown nickname.
|
||||
# %1$S is the nickname of the user who changed the mode and %2$S is the new
|
||||
# channel key (password).
|
||||
message.channelKeyAdded=%1$S changed the channel password to %2$S.
|
||||
message.channelKeyRemoved=%S removed the channel password.
|
||||
# This will be followed by a list of ban masks.
|
||||
message.banMasks=Users connected from the following locations are banned from %S:
|
||||
message.noBanMasks=There are no banned locations for %S.
|
||||
message.banMaskAdded=Users connected from locations matching %1$S have been banned by %2$S.
|
||||
message.banMaskRemoved=Users connected from locations matching %1$S are no longer banned by %2$S.
|
||||
# LOCALIZATION NOTE (message.ping): Semi-colon list of plural forms.
|
||||
# See: http://developer.mozilla.org/en/docs/Localization_and_Plurals
|
||||
# %1$S is the nickname of the user or the server that was pinged.
|
||||
# #2 is the delay (in milliseconds).
|
||||
message.ping=Ping reply from %1$S in #2 millisecond.;Ping reply from %1$S in #2 milliseconds.
|
||||
|
||||
|
||||
# LOCALIZATION NOTE (error.*):
|
||||
# These are shown as error messages in the conversation or server tab.
|
||||
# %S is the channel name.
|
||||
error.noChannel=There is no channel: %S.
|
||||
error.tooManyChannels=Cannot join %S; you've joined too many channels.
|
||||
# %1$S is your new nick, %2$S is the kill message from the server.
|
||||
error.nickCollision=Nick already in use, changing nick to %1$S [%2$S].
|
||||
error.erroneousNickname=%S is not an allowed nickname.
|
||||
error.banned=You are banned from this server.
|
||||
error.bannedSoon=You will soon be banned from this server.
|
||||
error.mode.wrongUser=You cannot change modes for other users.
|
||||
# %S is the nickname or channel name that isn't available.
|
||||
error.noSuchNick=%S is not online.
|
||||
error.wasNoSuchNick=There was no nickname: %S
|
||||
error.noSuchChannel=There is no channel: %S.
|
||||
error.unavailable=%S is temporarily unavailable.
|
||||
# %S is the channel name.
|
||||
error.channelBanned=You have been banned from %S.
|
||||
error.cannotSendToChannel=You cannot send messages to %S.
|
||||
error.channelFull=The channel %S is full.
|
||||
error.inviteOnly=You must be invited to join %S.
|
||||
error.nonUniqueTarget=%S is not a unique user@host or shortname or you have tried to join too many channels at once.
|
||||
error.notChannelOp=You are not a channel operator on %S.
|
||||
error.notChannelOwner=You are not a channel owner of %S.
|
||||
error.wrongKey=Cannot join %S, invalid channel password.
|
||||
error.sendMessageFailed=An error occurred while sending your last message. Please try again once the connection has been reestablished.
|
||||
# %1$S is the channel the user tried to join, %2$S is the channel
|
||||
# he was forwarded to.
|
||||
error.channelForward=You may not join %1$S, and were automatically redirected to %2$S.
|
||||
# %S is the mode that the user tried to set but was not recognized
|
||||
# by the server as a valid mode.
|
||||
error.unknownMode='%S' is not a valid user mode on this server.
|
||||
|
||||
# LOCALIZATION NOTE (tooltip.*):
|
||||
# These are the descriptions given in a tooltip with information received
|
||||
# from a whois response.
|
||||
# The human readable ("realname") description of the user.
|
||||
tooltip.realname=Name
|
||||
tooltip.server=Connected to
|
||||
# The username and hostname that the user connects from (usually based on the
|
||||
# reverse DNS of the user's IP, but often mangled by the server to
|
||||
# protect users).
|
||||
tooltip.connectedFrom=Connected from
|
||||
tooltip.registered=Registered
|
||||
tooltip.registeredAs=Registered as
|
||||
tooltip.secure=Using a secure connection
|
||||
# The away message of the user
|
||||
tooltip.away=Away
|
||||
tooltip.ircOp=IRC Operator
|
||||
tooltip.bot=Bot
|
||||
tooltip.lastActivity=Last activity
|
||||
# %S is the timespan elapsed since the last activity.
|
||||
tooltip.timespan=%S ago
|
||||
tooltip.channels=Currently on
|
||||
|
||||
# %1$S is the server name, %2$S is some generic server information (usually a
|
||||
# location or the date the user was last seen).
|
||||
tooltip.serverValue=%1$S (%2$S)
|
||||
|
||||
# LOCALIZATION NOTE (yes, no):
|
||||
# These are used to turn true/false values into a yes/no response.
|
||||
yes=Yes
|
||||
no=No
|
|
@ -2,6 +2,6 @@
|
|||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
# LOCALIZATION NOTE (badLogfile):
|
||||
# %S is the filename of the log file.
|
||||
badLogfile=Empty or corrupt log file: %S
|
||||
# LOCALIZATION NOTE (bad-logfile):
|
||||
# $filename is the filename of the log file.
|
||||
bad-logfile = Empty or corrupt log file: { $filename }
|
|
@ -0,0 +1,298 @@
|
|||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
# LOCALIZATION NOTE (matrix-username-hint):
|
||||
# This is displayed inside the accountUsernameInfoWithDescription
|
||||
# string defined in imAccounts.properties when the user is
|
||||
# configuring a Matrix account.
|
||||
matrix-username-hint = Matrix ID
|
||||
|
||||
# LOCALIZATION NOTE (options-*):
|
||||
# These are the protocol specific options shown in the account manager and
|
||||
# account wizard windows.
|
||||
options-save-token = Store access token
|
||||
options-device-display-name = Device display name
|
||||
options-homeserver = Server
|
||||
options-backup-passphrase = Key Backup Passphrase
|
||||
|
||||
# LOCALIZATION NOTE (options-encryption-*):
|
||||
# These are strings used to build the status information of the encryption
|
||||
# storage, shown in the account manager. $status (String) is one of the statuses and the
|
||||
# strings are combined with a pipe (|) between.
|
||||
options-encryption-enabled = Cryptographic Functions: { $status }
|
||||
# $status (String) a status
|
||||
options-encryption-secret-storage = Secret Storage: { $status }
|
||||
# $status (String) a status
|
||||
options-encryption-key-backup = Encryption Key Backup: { $status }
|
||||
# $status (String) a status
|
||||
options-encryption-cross-signing = Cross Signing: { $status }
|
||||
options-encryption-status-ok = ok
|
||||
options-encryption-status-not-ok = not ready
|
||||
options-encryption-need-backup-passphrase = Please enter your backup key passphrase in the protocol options.
|
||||
options-encryption-set-up-secret-storage = To set up secret storage, please use another client and afterwards enter the generated backup key passphrase in the "General" tab.
|
||||
options-encryption-set-up-backup-and-cross-signing = To activate encryption key backups and cross signing, enter your backup key passphrase in the "General" tab or verify the identity of one of the sessions below.
|
||||
# $sessionId (String) is the session ID, $sessionDisplayName (String) is the session display name
|
||||
options-encryption-session = { $sessionId } ({ $sessionDisplayName })
|
||||
|
||||
# LOCALIZATION NOTE (connection-*):
|
||||
# These will be displayed in the account manager in order to show the progress
|
||||
# of the connection.
|
||||
# (These will be displayed in account.connection.progress from
|
||||
# accounts.properties, which adds … at the end, so do not include
|
||||
# periods at the end of these messages.)
|
||||
connection-request-auth = Waiting for your authorization
|
||||
connection-request-access = Finalizing authentication
|
||||
|
||||
# LOCALIZATION NOTE (connection-error-*):
|
||||
# These will show in the account manager if an error occurs during the
|
||||
# connection attempt.
|
||||
connection-error-no-supported-flow = Server offers no compatible login flow.
|
||||
connection-error-auth-cancelled = You cancelled the authorization process.
|
||||
connection-error-session-ended = Session was logged out.
|
||||
connection-error-server-not-found = Could not identify the Matrix server for the given Matrix account.
|
||||
|
||||
# LOCALIZATION NOTE (chat-room-field-*):
|
||||
# These are the name of fields displayed in the 'Join Chat' dialog
|
||||
# for Matrix accounts.
|
||||
# The _ character won't be displayed; it indicates the next
|
||||
# character of the string should be used as the access key for this
|
||||
# field.
|
||||
chat-room-field-room = _Room
|
||||
|
||||
# LOCALIZATION NOTE (tooltip-*):
|
||||
# These are the descriptions given in a tooltip with information received
|
||||
# from the "User" object.
|
||||
# The human readable name of the user.
|
||||
tooltip-display-name = Display name
|
||||
# $timespan (String) is the timespan elapsed since the last activity.
|
||||
tooltip-timespan = { $timespan } ago
|
||||
tooltip-last-active = Last activity
|
||||
|
||||
# LOCALIZATION NOTE (power-level-*):
|
||||
# These are the string representations of different standard power levels and strings.
|
||||
# $powerLevelName (String) are one of the power levels, Default/Moderator/Admin/Restricted/Custom.
|
||||
# $powerLevelName (String) is the power level name
|
||||
# $powerLevelNumber (String) is the power level number
|
||||
power-level-default = Default
|
||||
power-level-moderator = Moderator
|
||||
power-level-admin = Admin
|
||||
power-level-restricted = Restricted
|
||||
power-level-custom = Custom
|
||||
# $powerLevelName is the power level name
|
||||
# $powerLevelNumber is the power level number
|
||||
power-level-detailed = { $powerLevelName } ({ $powerLevelNumber })
|
||||
# $powerLevelName is the power level name
|
||||
power-level-default-role = Default role: { $powerLevelName }
|
||||
# $powerLevelName is the power level name
|
||||
power-level-invite-user = Invite users: { $powerLevelName }
|
||||
# $powerLevelName is the power level name
|
||||
power-level-kick-users = Kick users: { $powerLevelName }
|
||||
# $powerLevelName is the power level name
|
||||
power-level-ban = Ban users: { $powerLevelName }
|
||||
# $powerLevelName is the power level name
|
||||
power-level-room-avatar = Change room avatar: { $powerLevelName }
|
||||
# $powerLevelName is the power level name
|
||||
power-level-main-address = Change main address for the room: { $powerLevelName }
|
||||
# $powerLevelName is the power level name
|
||||
power-level-history = Change history visibility: { $powerLevelName }
|
||||
# $powerLevelName is the power level name
|
||||
power-level-room-name = Change room name: { $powerLevelName }
|
||||
# $powerLevelName is the power level name
|
||||
power-level-change-permissions = Change permissions: { $powerLevelName }
|
||||
# $powerLevelName is the power level name
|
||||
power-level-server-acl = Send m.room.server_acl events: { $powerLevelName }
|
||||
# $powerLevelName is the power level name
|
||||
power-level-upgrade-room = Upgrade the room: { $powerLevelName }
|
||||
# $powerLevelName is the power level name
|
||||
power-level-remove = Remove messages: { $powerLevelName }
|
||||
# $powerLevelName is the power level name
|
||||
power-level-events-default = Events default: { $powerLevelName }
|
||||
# $powerLevelName is the power level name
|
||||
power-level-state-default = Change setting: { $powerLevelName }
|
||||
# $powerLevelName is the power level name
|
||||
power-level-encryption = Enable Room encryption: { $powerLevelName }
|
||||
# $powerLevelName is the power level name
|
||||
power-level-topic = Set room topic: { $powerLevelName }
|
||||
|
||||
# LOCALIZATION NOTE (detail-*):
|
||||
# These are the string representations of different matrix properties.
|
||||
# $value will typically be strings with the actual values.
|
||||
# $value Example placeholder: "Foo bar"
|
||||
detail-name = Name: { $value }
|
||||
# $value Example placeholder: "My first room"
|
||||
detail-topic = Topic: { $value }
|
||||
# $value Example placeholder: "5"
|
||||
detail-version = Room Version: { $value }
|
||||
# $value Example placeholder: "#thunderbird:mozilla.org"
|
||||
detail-room-id = RoomID: { $value }
|
||||
# $value are all admin users. Example: "@foo:example.com, @bar:example.com"
|
||||
detail-admin = Admin: { $value }
|
||||
# $value are all moderators. Example: "@lorem:mozilla.org, @ipsum:mozilla.org"
|
||||
detail-moderator = Moderator: { $value }
|
||||
# $value Example placeholder: "#thunderbird:matrix.org"
|
||||
detail-alias = Alias: { $value }
|
||||
# $value Example placeholder: "can_join"
|
||||
detail-guest = Guest Access: { $value }
|
||||
# This is a heading, followed by the power-level-* strings
|
||||
detail-power = Power Levels:
|
||||
|
||||
# LOCALIZATION NOTE (command-*):
|
||||
# These are the help messages for each command, the $commandName is the command name
|
||||
# Each command first gives the parameter it accepts and then a description of
|
||||
# the command.
|
||||
command-ban = { $commandName } <userId> [<reason>]: Ban the user with the userId from the room with optional reason message. Requires permission to ban users.
|
||||
# $commandName is the command name
|
||||
command-invite = { $commandName } <userId>: Invite the user to the room.
|
||||
# $commandName is the command name
|
||||
command-kick = { $commandName } <userId> [<reason>]: Kick the user with the userId from the room with optional reason message. Requires permission to kick users.
|
||||
# $commandName is the command name
|
||||
command-nick = { $commandName } <display_name>: Change your display name.
|
||||
# $commandName is the command name
|
||||
command-op = { $commandName } <userId> [<power level>]: Define the power level of the user. Enter an integer value, User: 0, Moderator: 50 and Admin: 100. Default will be 50 if no argument is provided. Requires permission to change member's power levels. Does not work on admins other than yourself.
|
||||
# $commandName is the command name
|
||||
command-deop = { $commandName } <userId>: Reset the user to power level 0 (User). Requires permission to change member's power levels. Does not work on admins other than yourself.
|
||||
# $commandName is the command name
|
||||
command-leave = { $commandName }: Leave the current room.
|
||||
# $commandName is the command name
|
||||
command-topic = { $commandName } <topic>: Set the topic for the room. Requires permissions to change the room topic.
|
||||
# $commandName is the command name
|
||||
command-unban = { $commandName } <userId>: Unban a user who is banned from the room. Requires permission to ban users.
|
||||
# $commandName is the command name
|
||||
command-visibility = { $commandName } [<visibility>]: Set the visibility of the current room in the current Home Server's room directory. Enter an integer value, Private: 0 and Public: 1. Default will be Private (0) if no argument is provided. Requires permission to change room visibility.
|
||||
# $commandName is the command name
|
||||
command-guest = { $commandName } <guest access> <history visibility>: Set the access and history visibility of the current room for the guest users. Enter two integer values, the first for the guest access (not allowed: 0 and allowed: 1) and the second for the history visibility (not visible: 0 and visible: 1). Requires permission to change history visibility.
|
||||
# $commandName is the command name
|
||||
command-roomname = { $commandName } <name>: Set the name for the room. Requires permission to change the room name.
|
||||
# $commandName is the command name
|
||||
command-detail = { $commandName }: Display the details of the room.
|
||||
# $commandName is the command name
|
||||
command-addalias = { $commandName } <alias>: Create an alias for the room. Expected room alias of the form '#localname:domain'. Requires permission to add aliases.
|
||||
# $commandName is the command name
|
||||
command-removealias = { $commandName } <alias>: Remove the alias for the room. Expected room alias of the form '#localname:domain'. Requires permission to remove aliases.
|
||||
# $commandName is the command name
|
||||
command-upgraderoom = { $commandName } <newVersion>: Upgrade room to given version. Requires permission to upgrade the room.
|
||||
# $commandName is the command name
|
||||
command-me = { $commandName } <action>: Perform an action.
|
||||
# $commandName is the command name
|
||||
command-msg = { $commandName } <userId> <message>: Send a direct message to the given user.
|
||||
# $commandName is the command name
|
||||
command-join = { $commandName } <roomId>: Join the given room.
|
||||
|
||||
# LOCALIZATION NOTE (message-*):
|
||||
# These are shown as system messages in the conversation.
|
||||
# $user is the name of the user who banned.
|
||||
# $userBanned is the name of the user who got banned.
|
||||
message-banned = { $user } banned { $userBanned }.
|
||||
# $user is the name of the user who banned.
|
||||
# $userBanned is the name of the user who got banned.
|
||||
# $reason is the reason the user was banned.
|
||||
message-banned-with-reason = { $user } banned { $userBanned }. Reason: { $reason }
|
||||
# $user is the name of the user who accepted the invitation.
|
||||
# $userWhoSent is the name of the user who sent the invitation.
|
||||
message-accepted-invite-for = { $user } accepted the invitation for { $userWhoSent }.
|
||||
# $user is the name of the user who accepted an invitation.
|
||||
message-accepted-invite = { $user } accepted an invitation.
|
||||
# $user is the name of the user who invited.
|
||||
# $userWhoGotInvited is the name of the user who got invited.
|
||||
message-invited = { $user } invited { $userWhoGotInvited }.
|
||||
# $user is the name of the user who changed their display name.
|
||||
# $oldDisplayName is the old display name.
|
||||
# $newDisplayName is the new display name.
|
||||
message-display-name-changed = { $user } changed their display name from { $oldDisplayName } to { $newDisplayName }.
|
||||
# $user is the name of the user who set their display name.
|
||||
# $changedName is the newly set display name.
|
||||
message-display-name-set = { $user } set their display name to { $changedName }.
|
||||
# $user is the name of the user who removed their display name.
|
||||
# $nameRemoved is the old display name which has been removed.
|
||||
message-display-name-remove = { $user } removed their display name { $nameRemoved }.
|
||||
# $user is the name of the user who has joined the room.
|
||||
message-joined = { $user } has joined the room.
|
||||
# $user is the name of the user who has rejected the invitation.
|
||||
message-rejected-invite = { $user } has rejected the invitation.
|
||||
# $user is the name of the user who has left the room.
|
||||
message-left = { $user } has left the room.
|
||||
# $user is the name of the user who unbanned.
|
||||
# $userUnbanned is the name of the user who got unbanned.
|
||||
message-unbanned = { $user } unbanned { $userUnbanned }.
|
||||
# $user is the name of the user who kicked.
|
||||
# $userGotKicked is the name of the user who got kicked.
|
||||
message-kicked = { $user } kicked { $userGotKicked }.
|
||||
# $user is the name of the user who kicked.
|
||||
# $userGotKicked is the name of the user who got kicked.
|
||||
# $reason is the reason for the kick.
|
||||
message-kicked-with-reason = { $user } kicked { $userGotKicked }. Reason: { $reason }
|
||||
# $user is the name of the user who withdrew invitation.
|
||||
# $userInvitationWithdrawn is the name of the user whose invitation has been withdrawn.
|
||||
message-withdrew-invite = { $user } withdrew { $userInvitationWithdrawn }'s invitation.
|
||||
# $user is the name of the user who withdrew invitation.
|
||||
# $userInvitationWithdrawn is the name of the user whose invitation has been withdrawn.
|
||||
# $reason is the reason the invite was withdrawn.
|
||||
message-withdrew-invite-with-reason = { $user } withdrew { $userInvitationWithdrawn }'s invitation. Reason: { $reason }
|
||||
# $user is the name of the user who has removed the room name.
|
||||
message-room-name-remove = { $user } removed the room name.
|
||||
# $user is the name of the user who changed the room name.
|
||||
# $newRoomName is the new room name.
|
||||
message-room-name-changed = { $user } changed the room name to { $newRoomName }.
|
||||
# $user is the name of the user who changed the power level.
|
||||
# $powerLevelChanges is a list of "message-power-level-from-to" strings representing power level changes separated by commas
|
||||
# power level changes, separated by commas if there are multiple changes.
|
||||
message-power-level-changed = { $user } changed the power level of { $powerLevelChanges }.
|
||||
# $user is the name of the target user whose power level has been changed.
|
||||
# $oldPowerLevel is the old power level.
|
||||
# $newPowerLevel is the new power level.
|
||||
message-power-level-from-to = { $user } from { $oldPowerLevel } to { $newPowerLevel }
|
||||
# $user is the name of the user who has allowed guests to join the room.
|
||||
message-guest-allowed = { $user } has allowed guests to join the room.
|
||||
# $user is the name of the user who has prevented guests to join the room.
|
||||
message-guest-prevented = { $user } has prevented guests from joining the room.
|
||||
# $user is the name of the user who has made future room history visible to anyone.
|
||||
message-history-anyone = { $user } made future room history visible to anyone.
|
||||
# $user is the name of the user who has made future room history visible to all room members.
|
||||
message-history-shared = { $user } made future room history visible to all room members.
|
||||
# $user is the name of the user who has made future room history visible to all room members, from the point they are invited.
|
||||
message-history-invited = { $user } made future room history visible to all room members, from the point they are invited.
|
||||
# $user is the name of the user who has made future room history visible to all room members, from the point they joined.
|
||||
message-history-joined = { $user } made future room history visible to all room members, from the point they joined.
|
||||
# $user is the name of the user who changed the address.
|
||||
# $oldAddress is the old address.
|
||||
# $newAddress is the new address.
|
||||
message-alias-main = { $user } set the main address for this room from { $oldAddress } to { $newAddress }.
|
||||
# $user is the name of the user who added the address.
|
||||
# $addresses is a comma delimited list of added addresses.
|
||||
message-alias-added = { $user } added { $addresses } as alternative address for this room.
|
||||
# $user is the name of the user who removed the address.
|
||||
# $addresses is a comma delimited list of removed addresses.
|
||||
message-alias-removed = { $user } removed { $addresses } as alternative address for this room.
|
||||
# $user is the name of the user that edited the alias addresses.
|
||||
# $removedAddresses is a comma delimited list of removed addresses.
|
||||
# $addedAddresses is a comma delmited list of added addresses.
|
||||
message-alias-removed-and-added = { $user } removed { $removedAddresses } and added { $addedAddresses } as address for this room.
|
||||
message-space-not-supported = This room is a space, which is not supported.
|
||||
message-encryption-start = Messages in this conversation are now end-to-end encrypted.
|
||||
# $user is the name of the user who sent the verification request.
|
||||
# $userReceiving is the name of the user that is receiving the verification request.
|
||||
message-verification-request2 = { $user } wants to verify { $userReceiving }.
|
||||
# $user is the name of the user who cancelled the verification request.
|
||||
# $reason is the reason given why the verification was cancelled.
|
||||
message-verification-cancel2 = { $user } cancelled the verification with the reason: { $reason }
|
||||
message-verification-done = Verification completed.
|
||||
message-decryption-error = Could not decrypt the contents of this message. To request encryption keys from your other devices, right click this message.
|
||||
message-decrypting = Decrypting…
|
||||
message-redacted = Message was redacted.
|
||||
# $userThatReacted is the username of the user that reacted.
|
||||
# $userThatSentMessage is the username of the user that sent the message the reaction was added to.
|
||||
# $reaction is the content (typically an emoji) of the reaction.
|
||||
message-reaction = { $userThatReacted } reacted to { $userThatSentMessage } with { $reaction }.
|
||||
|
||||
# Label in the message context menu
|
||||
message-action-request-key = Re-request Keys
|
||||
message-action-redact = Redact
|
||||
message-action-report = Report Message
|
||||
message-action-retry = Retry Sending
|
||||
message-action-cancel = Cancel Message
|
||||
|
||||
# LOCALIZATION NOTE (error-*)
|
||||
# These are strings shown as system messages when an action the user took fails.
|
||||
# $message is the message.
|
||||
error-send-message-failed = An error occurred while sending your message "{ $message }".
|
|
@ -1,255 +0,0 @@
|
|||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
# LOCALIZATION NOTE (matrix.usernameHint):
|
||||
# This is displayed inside the accountUsernameInfoWithDescription
|
||||
# string defined in imAccounts.properties when the user is
|
||||
# configuring a Matrix account.
|
||||
matrix.usernameHint=Matrix ID
|
||||
|
||||
# LOCALIZATION NOTE (options.*):
|
||||
# These are the protocol specific options shown in the account manager and
|
||||
# account wizard windows.
|
||||
options.saveToken=Store access token
|
||||
options.deviceDisplayName=Device display name
|
||||
options.homeserver=Server
|
||||
options.backupPassphrase=Key Backup Passphrase
|
||||
|
||||
# LOCALIZATION NOTE (options.encryption.*):
|
||||
# These are strings used to build the status information of the encryption
|
||||
# storage, shown in the account manager. %S is one of the statuses and the
|
||||
# strings are combined with a pipe (|) between.
|
||||
options.encryption.enabled=Cryptographic Functions: %S
|
||||
options.encryption.secretStorage=Secret Storage: %S
|
||||
options.encryption.keyBackup=Encryption Key Backup: %S
|
||||
options.encryption.crossSigning=Cross Signing: %S
|
||||
options.encryption.statusOk=ok
|
||||
options.encryption.statusNotOk=not ready
|
||||
options.encryption.needBackupPassphrase=Please enter your backup key passphrase in the protocol options.
|
||||
options.encryption.setUpSecretStorage=To set up secret storage, please use another client and afterwards enter the generated backup key passphrase in the "General" tab.
|
||||
options.encryption.setUpBackupAndCrossSigning=To activate encryption key backups and cross signing, enter your backup key passphrase in the "General" tab or verify the identity of one of the sessions below.
|
||||
# %1$S is the session ID, %2$S is the session display name
|
||||
options.encryption.session=%1$S (%2$S)
|
||||
|
||||
# LOCALIZATION NOTE (connection.*):
|
||||
# These will be displayed in the account manager in order to show the progress
|
||||
# of the connection.
|
||||
# (These will be displayed in account.connection.progress from
|
||||
# accounts.properties, which adds … at the end, so do not include
|
||||
# periods at the end of these messages.)
|
||||
connection.requestAuth=Waiting for your authorization
|
||||
connection.requestAccess=Finalizing authentication
|
||||
|
||||
# LOCALIZATION NOTE (connection.error.*):
|
||||
# These will show in the account manager if an error occurs during the
|
||||
# connection attempt.
|
||||
connection.error.noSupportedFlow=Server offers no compatible login flow.
|
||||
connection.error.authCancelled=You cancelled the authorization process.
|
||||
connection.error.sessionEnded=Session was logged out.
|
||||
connection.error.serverNotFound=Could not identify the Matrix server for the given Matrix account.
|
||||
|
||||
# LOCALIZATION NOTE (chatRoomField.*):
|
||||
# These are the name of fields displayed in the 'Join Chat' dialog
|
||||
# for Matrix accounts.
|
||||
# The _ character won't be displayed; it indicates the next
|
||||
# character of the string should be used as the access key for this
|
||||
# field.
|
||||
chatRoomField.room=_Room
|
||||
|
||||
# LOCALIZATION NOTE (tooltip.*):
|
||||
# These are the descriptions given in a tooltip with information received
|
||||
# from the "User" object.
|
||||
# The human readable name of the user.
|
||||
tooltip.displayName=Display name
|
||||
# %S is the timespan elapsed since the last activity.
|
||||
tooltip.timespan=%S ago
|
||||
tooltip.lastActive=Last activity
|
||||
|
||||
# LOCALIZATION NOTE (powerLevel.*):
|
||||
# These are the string representations of different standard power levels and strings.
|
||||
# %S are one of the power levels, Default/Moderator/Admin/Restricted/Custom.
|
||||
powerLevel.default=Default
|
||||
powerLevel.moderator=Moderator
|
||||
powerLevel.admin=Admin
|
||||
powerLevel.restricted=Restricted
|
||||
powerLevel.custom=Custom
|
||||
# %1$S is the power level name
|
||||
# %2$S is the power level number
|
||||
powerLevel.detailed=%1$S (%2$S)
|
||||
powerLevel.defaultRole=Default role: %S
|
||||
powerLevel.inviteUser=Invite users: %S
|
||||
powerLevel.kickUsers=Kick users: %S
|
||||
powerLevel.ban=Ban users: %S
|
||||
powerLevel.roomAvatar=Change room avatar: %S
|
||||
powerLevel.mainAddress=Change main address for the room: %S
|
||||
powerLevel.history=Change history visibility: %S
|
||||
powerLevel.roomName=Change room name: %S
|
||||
powerLevel.changePermissions=Change permissions: %S
|
||||
powerLevel.server_acl=Send m.room.server_acl events: %S
|
||||
powerLevel.upgradeRoom=Upgrade the room: %S
|
||||
powerLevel.remove=Remove messages: %S
|
||||
powerLevel.events_default=Events default: %S
|
||||
powerLevel.state_default=Change setting: %S
|
||||
powerLevel.encryption=Enable Room encryption: %S
|
||||
powerLevel.topic=Set room topic: %S
|
||||
|
||||
# LOCALIZATION NOTE (detail.*):
|
||||
# These are the string representations of different matrix properties.
|
||||
# %S will typically be strings with the actual values.
|
||||
# Example placeholder: "Foo bar"
|
||||
detail.name=Name: %S
|
||||
# Example placeholder: "My first room"
|
||||
detail.topic=Topic: %S
|
||||
# Example placeholder: "5"
|
||||
detail.version=Room Version: %S
|
||||
# Example placeholder: "#thunderbird:mozilla.org"
|
||||
detail.roomId=RoomID: %S
|
||||
# %S are all admin users. Example: "@foo:example.com, @bar:example.com"
|
||||
detail.admin=Admin: %S
|
||||
# %S are all moderators. Example: "@lorem:mozilla.org, @ipsum:mozilla.org"
|
||||
detail.moderator=Moderator: %S
|
||||
# Example placeholder: "#thunderbird:matrix.org"
|
||||
detail.alias=Alias: %S
|
||||
# Example placeholder: "can_join"
|
||||
detail.guest=Guest Access: %S
|
||||
# This is a heading, followed by the powerLevel.* strings
|
||||
detail.power=Power Levels:
|
||||
|
||||
# LOCALIZATION NOTE (command.*):
|
||||
# These are the help messages for each command, the %S is the command name
|
||||
# Each command first gives the parameter it accepts and then a description of
|
||||
# the command.
|
||||
command.ban=%S <userId> [<reason>]: Ban the user with the userId from the room with optional reason message. Requires permission to ban users.
|
||||
command.invite=%S <userId>: Invite the user to the room.
|
||||
command.kick=%S <userId> [<reason>]: Kick the user with the userId from the room with optional reason message. Requires permission to kick users.
|
||||
command.nick=%S <display_name>: Change your display name.
|
||||
command.op=%S <userId> [<power level>]: Define the power level of the user. Enter an integer value, User: 0, Moderator: 50 and Admin: 100. Default will be 50 if no argument is provided. Requires permission to change member's power levels. Does not work on admins other than yourself.
|
||||
command.deop=%S <userId>: Reset the user to power level 0 (User). Requires permission to change member's power levels. Does not work on admins other than yourself.
|
||||
command.leave=%S: Leave the current room.
|
||||
command.topic=%S <topic>: Set the topic for the room. Requires permissions to change the room topic.
|
||||
command.unban=%S <userId>: Unban a user who is banned from the room. Requires permission to ban users.
|
||||
command.visibility=%S [<visibility>]: Set the visibility of the current room in the current Home Server's room directory. Enter an integer value, Private: 0 and Public: 1. Default will be Private (0) if no argument is provided. Requires permission to change room visibility.
|
||||
command.guest=%S <guest access> <history visibility>: Set the access and history visibility of the current room for the guest users. Enter two integer values, the first for the guest access (not allowed: 0 and allowed: 1) and the second for the history visibility (not visible: 0 and visible: 1). Requires permission to change history visibility.
|
||||
command.roomname=%S <name>: Set the name for the room. Requires permission to change the room name.
|
||||
command.detail=%S: Display the details of the room.
|
||||
command.addalias=%S <alias>: Create an alias for the room. Expected room alias of the form '#localname:domain'. Requires permission to add aliases.
|
||||
command.removealias=%S <alias>: Remove the alias for the room. Expected room alias of the form '#localname:domain'. Requires permission to remove aliases.
|
||||
command.upgraderoom=%S <newVersion>: Upgrade room to given version. Requires permission to upgrade the room.
|
||||
command.me=%S <action>: Perform an action.
|
||||
command.msg=%S <userId> <message>: Send a direct message to the given user.
|
||||
command.join=%S <roomId>: Join the given room.
|
||||
|
||||
# LOCALIZATION NOTE (message.*):
|
||||
# These are shown as system messages in the conversation.
|
||||
# %1$S is the name of the user who banned.
|
||||
# %2$S is the name of the user who got banned.
|
||||
message.banned=%1$S banned %2$S.
|
||||
# Same as message.banned but with a reason.
|
||||
# %3$S is the reason the user was banned.
|
||||
message.bannedWithReason=%1$S banned %2$S. Reason: %3$S
|
||||
# %1$S is the name of the user who accepted the invitation.
|
||||
# %2$S is the name of the user who sent the invitation.
|
||||
message.acceptedInviteFor=%1$S accepted the invitation for %2$S.
|
||||
# %S is the name of the user who accepted an invitation.
|
||||
message.acceptedInvite=$S accepted an invitation.
|
||||
# %1$S is the name of the user who invited.
|
||||
# %2$S is the name of the user who got invited.
|
||||
message.invited=%1$S invited %2$S.
|
||||
# %1$S is the name of the user who changed their display name.
|
||||
# %2$S is the old display name.
|
||||
# %3$S is the new display name.
|
||||
message.displayName.changed=%1$S changed their display name from %2$S to %3$S.
|
||||
# %1$S is the name of the user who set their display name.
|
||||
# %2$S is the newly set display name.
|
||||
message.displayName.set=%1$S set their display name to %2$S.
|
||||
# %1$S is the name of the user who removed their display name.
|
||||
# %2$S is the old display name which has been removed.
|
||||
message.displayName.remove=%1$S removed their display name %2$S.
|
||||
# %S is the name of the user who has joined the room.
|
||||
message.joined=%S has joined the room.
|
||||
# %S is the name of the user who has rejected the invitation.
|
||||
message.rejectedInvite=%S has rejected the invitation.
|
||||
# %S is the name of the user who has left the room.
|
||||
message.left=%S has left the room.
|
||||
# %1$S is the name of the user who unbanned.
|
||||
# %2$S is the name of the user who got unbanned.
|
||||
message.unbanned=%1$S unbanned %2$S.
|
||||
# %1$S is the name of the user who kicked.
|
||||
# %2$S is the name of the user who got kicked.
|
||||
message.kicked=%1$S kicked %2$S.
|
||||
# Same as message.kicked but with a third parameter for the reason.
|
||||
# %3$S is the reason for the kick.
|
||||
message.kickedWithReason=%1$S kicked %2$S. Reason: %3$S
|
||||
# %1$S is the name of the user who withdrew invitation.
|
||||
# %2$S is the name of the user whose invitation has been withdrawn.
|
||||
message.withdrewInvite=%1$S withdrew %2$S's invitation.
|
||||
# Same as message.withdrewInvite but with a third parameter for the reason.
|
||||
# %3$S is the reason the invite was withdrawn.
|
||||
message.withdrewInviteWithReason=%1$S withdrew %2$S's invitation. Reason: %3$S
|
||||
# %S is the name of the user who has removed the room name.
|
||||
message.roomName.remove=%S removed the room name.
|
||||
# %1$S is the name of the user who changed the room name.
|
||||
# %2$S is the new room name.
|
||||
message.roomName.changed=%1$S changed the room name to %2$S.
|
||||
# %1$S is the name of the user who changed the power level.
|
||||
# %2$S is a list of "message.powerLevel.fromTo" strings representing power level changes separated by commas
|
||||
# power level changes, separated by commas if there are multiple changes.
|
||||
message.powerLevel.changed=%1$S changed the power level of %2$S.
|
||||
# %1$S is the name of the target user whose power level has been changed.
|
||||
# %2$S is the old power level.
|
||||
# %2$S is the new power level.
|
||||
message.powerLevel.fromTo=%1$S from %2$S to %3$S
|
||||
# %S is the name of the user who has allowed guests to join the room.
|
||||
message.guest.allowed=%S has allowed guests to join the room.
|
||||
# %S is the name of the user who has prevented guests to join the room.
|
||||
message.guest.prevented=%S has prevented guests from joining the room.
|
||||
# %S is the name of the user who has made future room history visible to anyone.
|
||||
message.history.anyone=%S made future room history visible to anyone.
|
||||
# %S is the name of the user who has made future room history visible to all room members.
|
||||
message.history.shared=%S made future room history visible to all room members.
|
||||
# %S is the name of the user who has made future room history visible to all room members, from the point they are invited.
|
||||
message.history.invited=%S made future room history visible to all room members, from the point they are invited.
|
||||
# %S is the name of the user who has made future room history visible to all room members, from the point they joined.
|
||||
message.history.joined=%S made future room history visible to all room members, from the point they joined.
|
||||
# %1$S is the name of the user who changed the address.
|
||||
# %2$S is the old address.
|
||||
# %3$S is the new address.
|
||||
message.alias.main=%1$S set the main address for this room from %2$S to %3$S.
|
||||
# %1$S is the name of the user who added the address.
|
||||
# %2$S is a comma delimited list of added addresses.
|
||||
message.alias.added=%1$S added %2$S as alternative address for this room.
|
||||
# %1$S is the name of the user who removed the address.
|
||||
# %2$S is a comma delimited list of removed addresses.
|
||||
message.alias.removed=%1$S removed %2$S as alternative address for this room.
|
||||
# %1$S is the name of the user that edited the alias addresses.
|
||||
# %2$S is a comma delimited list of removed addresses.
|
||||
# %3$S is a comma delmited list of added addresses.
|
||||
message.alias.removedAndAdded=%1$S removed %2$S and added %3$S as address for this room.
|
||||
message.spaceNotSupported=This room is a space, which is not supported.
|
||||
message.encryptionStart=Messages in this conversation are now end-to-end encrypted.
|
||||
# %1$S is the name of the user who sent the verification request.
|
||||
# %2$S is the name of the user that is receiving the verification request.
|
||||
message.verification.request2=%1$S wants to verify %2$S.
|
||||
# %1$S is the name of the user who cancelled the verification request.
|
||||
# %2$S is the reason given why the verification was cancelled.
|
||||
message.verification.cancel2=%1$S cancelled the verification with the reason: %2$S
|
||||
message.verification.done=Verification completed.
|
||||
message.decryptionError=Could not decrypt the contents of this message. To request encryption keys from your other devices, right click this message.
|
||||
message.decrypting=Decrypting…
|
||||
message.redacted=Message was redacted.
|
||||
# %1$S is the username of the user that reacted.
|
||||
# %2$S is the username of the user that sent the message the reaction was added to.
|
||||
# %3$S is the content (typically an emoji) of the reaction.
|
||||
message.reaction=%1$S reacted to %2$S with %3$S.
|
||||
|
||||
# Label in the message context menu
|
||||
message.action.requestKey=Re-request Keys
|
||||
message.action.redact=Redact
|
||||
message.action.report=Report Message
|
||||
message.action.retry=Retry Sending
|
||||
message.action.cancel=Cancel Message
|
||||
|
||||
# LOCALIZATION NOTE (error.*)
|
||||
# These are strings shown as system messages when an action the user took fails.
|
||||
error.sendMessageFailed=An error occurred while sending your message "%1$S".
|
|
@ -0,0 +1,23 @@
|
|||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
available-status-type = Available
|
||||
away-status-type = Away
|
||||
unavailable-status-type = Unavailable
|
||||
offline-status-type = Offline
|
||||
invisible-status-type = Invisible
|
||||
idle-status-type = Idle
|
||||
mobile-status-type = Mobile
|
||||
# LOCALIZATION NOTE (unknown-status-type):
|
||||
# the status of a buddy is unknown when it's in the list of a disconnected account
|
||||
unknown-status-type = Unknown
|
||||
|
||||
# LOCALIZATION NOTE (status-with-status-message):
|
||||
# Used to display the status of a buddy together with its status message.
|
||||
# $statusType is the status type, $statusMessage is the status message text.
|
||||
status-with-status-message = { $statusType } - { $statusMessage }
|
||||
|
||||
# LOCALIZATION NOTE (messenger-status-default-idle-away-message):
|
||||
# This will be the away message put automatically when the user is idle.
|
||||
messenger-status-default-idle-away-message = I am currently away from the computer.
|
|
@ -1,23 +0,0 @@
|
|||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
availableStatusType=Available
|
||||
awayStatusType=Away
|
||||
unavailableStatusType=Unavailable
|
||||
offlineStatusType=Offline
|
||||
invisibleStatusType=Invisible
|
||||
idleStatusType=Idle
|
||||
mobileStatusType=Mobile
|
||||
# LOCALIZATION NOTE (unknownStatusType):
|
||||
# the status of a buddy is unknown when it's in the list of a disconnected account
|
||||
unknownStatusType=Unknown
|
||||
|
||||
# LOCALIZATION NOTE (statusWithStatusMessage):
|
||||
# Used to display the status of a buddy together with its status message.
|
||||
# %1$S is the status type, %2$S is the status message text.
|
||||
statusWithStatusMessage=%1$S - %2$S
|
||||
|
||||
# LOCALIZATION NOTE (messenger.status.defaultIdleAwayMessage):
|
||||
# This will be the away message put automatically when the user is idle.
|
||||
messenger.status.defaultIdleAwayMessage=I am currently away from the computer.
|
|
@ -2,8 +2,8 @@
|
|||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
# LOCALIZATION NOTE (twitter.protocolName)
|
||||
# LOCALIZATION NOTE (twitter-protocol-name)
|
||||
# This name is used whenever the name of the protocol is shown.
|
||||
twitter.protocolName=Twitter
|
||||
twitter-protocol-name = Twitter
|
||||
|
||||
twitter.disabled=Twitter is no longer supported due to Twitter disabling their streaming protocol.
|
||||
twitter-disabled = Twitter is no longer supported due to Twitter disabling their streaming protocol.
|
|
@ -0,0 +1,310 @@
|
|||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
# LOCALIZATION NOTE (connection-*)
|
||||
# These will be displayed in the account manager in order to show the progress
|
||||
# of the connection.
|
||||
# (These will be displayed in account.connection.progress from
|
||||
# accounts.properties, which adds … at the end, so do not include
|
||||
# periods at the end of these messages.)
|
||||
connection-initializing-stream = Initializing stream
|
||||
connection-initializing-encryption = Initializing encryption
|
||||
connection-authenticating = Authenticating
|
||||
connection-getting-resource = Getting resource
|
||||
connection-downloading-roster = Downloading contact list
|
||||
connection-srv-lookup = Looking up the SRV record
|
||||
|
||||
# LOCALIZATION NOTE (connection-error-*)
|
||||
# These will show in the account manager if an error occurs during the
|
||||
# connection attempt.
|
||||
connection-error-invalid-username = Invalid username (your username should contain an '@' character)
|
||||
connection-error-failed-to-create-a-socket = Failed to create a socket (Are you offline?)
|
||||
connection-error-server-closed-connection = The server closed the connection
|
||||
connection-error-reset-by-peer = Connection reset by peer
|
||||
connection-error-timed-out = The connection timed out
|
||||
connection-error-received-unexpected-data = Received unexpected data
|
||||
connection-error-incorrect-response = Received an incorrect response
|
||||
connection-error-start-tls-required = The server requires encryption but you disabled it
|
||||
connection-error-start-tls-not-supported = The server doesn't support encryption but your configuration requires it
|
||||
connection-error-failed-to-start-tls = Failed to start encryption
|
||||
connection-error-no-auth-mec = No authentication mechanism offered by the server
|
||||
connection-error-no-compatible-auth-mec = None of the authentication mechanisms offered by the server are supported
|
||||
connection-error-not-sending-password-in-clear = The server only supports authentication by sending the password in cleartext
|
||||
connection-error-authentication-failure = Authentication failure
|
||||
connection-error-not-authorized = Not authorized (Did you enter the wrong password?)
|
||||
connection-error-failed-to-get-a-resource = Failed to get a resource
|
||||
connection-error-failed-max-resource-limit = This account is connected from too many places at the same time.
|
||||
connection-error-failed-resource-not-valid = Resource is not valid.
|
||||
connection-error-xmpp-not-supported = This server does not support XMPP
|
||||
|
||||
# LOCALIZATION NOTE (conversation-error-not-delivered):
|
||||
# This is displayed in a conversation as an error message when a message
|
||||
# the user has sent wasn't delivered.
|
||||
# $message is replaced by the text of the message that wasn't delivered.
|
||||
conversation-error-not-delivered = This message could not be delivered: { $message }
|
||||
# This is displayed in a conversation as an error message when joining a MUC
|
||||
# fails.
|
||||
# $mucName is the name of the MUC.
|
||||
conversation-error-join-failed = Could not join: { $mucName }
|
||||
# This is displayed in a conversation as an error message when the user is
|
||||
# banned from a room.
|
||||
# $mucName is the name of the MUC room.
|
||||
conversation-error-join-forbidden = Couldn't join { $mucName } as you are banned from this room.
|
||||
conversation-error-join-failed-not-authorized = Registration required: You are not authorized to join this room.
|
||||
conversation-error-creation-failed-not-allowed = Access restricted: You are not allowed to create rooms.
|
||||
# This is displayed in a conversation as an error message when remote server
|
||||
# is not found.
|
||||
# $mucName is the name of MUC room.
|
||||
conversation-error-join-failed-remote-server-not-found = Could not join the room { $mucName } as the server the room is hosted on could not be reached.
|
||||
conversation-error-change-topic-failed-not-authorized = You are not authorized to set the topic of this room.
|
||||
# This is displayed in a conversation as an error message when the user sends
|
||||
# a message to a room that he is not in.
|
||||
# $mucName is the name of MUC room.
|
||||
# $message is the text of the message that wasn't delivered.
|
||||
conversation-error-send-failed-as-not-inroom = Message could not be sent to { $mucName } as you are no longer in the room: { $message }
|
||||
# This is displayed in a conversation as an error message when the user sends
|
||||
# a message to a room that the recipient is not in.
|
||||
# $jabberIdentifier is the jid of the recipient.
|
||||
# $message is the text of the message that wasn't delivered.
|
||||
conversation-error-send-failed-as-recipient-not-inroom = Message could not be sent to { $jabberIdentifier } as the recipient is no longer in the room: { $message }
|
||||
# These are displayed in a conversation as a system error message.
|
||||
conversation-error-remote-server-not-found = Could not reach the recipient's server.
|
||||
conversation-error-unknown-send-error = An unknown error occurred on sending this message.
|
||||
# $nick is the name of the message recipient.
|
||||
conversation-error-send-service-unavailable = It is not possible to send messages to { $nick } at this time.
|
||||
|
||||
# $nick is the nick of participant that is not in room.
|
||||
conversation-error-nick-not-in-room = { $nick } is not in the room.
|
||||
conversation-error-ban-command-anonymous-room = You can't ban participants from anonymous rooms. Try /kick instead.
|
||||
conversation-error-ban-kick-command-not-allowed = You don't have the required privileges to remove this participant from the room.
|
||||
conversation-error-ban-kick-command-conflict = Sorry, you can't remove yourself from the room.
|
||||
# $nick is the nick of participant that is not in room.
|
||||
conversation-error-change-nick-failed-conflict = Could not change your nick to { $nick } as this nick is already in use.
|
||||
# $nick is a nick that cannot be set
|
||||
conversation-error-change-nick-failed-not-acceptable = Could not change your nick to { $nick } as nicks are locked down in this room.
|
||||
conversation-error-invite-failed-forbidden = You don't have the required privileges to invite users to this room.
|
||||
# $jabberIdentifier (String) is the jid of user that is invited.
|
||||
conversation-error-failed-jid-not-found = Could not reach { $jabberIdentifier }.
|
||||
# $jabberIdentifier (String) is the jid that is invalid.
|
||||
conversation-error-invalid-jid = { $jabberIdentifier } is an invalid jid (Jabber identifiers must be of the form user@domain).
|
||||
conversation-error-command-failed-not-in-room = You have to rejoin the room to be able to use this command.
|
||||
# $recipient (String) is the name of the recipient.
|
||||
conversation-error-resource-not-available = You must talk first as { $recipient } could be connected with more than one client.
|
||||
|
||||
# LOCALIZATION NOTE (conversation-error-version-*):
|
||||
# $recipient is the name of the recipient.
|
||||
conversation-error-version-unknown = { $recipient }'s client does not support querying for its software version.
|
||||
|
||||
# LOCALIZATION NOTE (tooltip-*):
|
||||
# These are the titles of lines of information that will appear in
|
||||
# the tooltip showing details about a contact or conversation.
|
||||
# LOCALIZATION NOTE (tooltip-status):
|
||||
# $resourceIdentifier (String) will be replaced by the XMPP resource identifier
|
||||
tooltip-status = Status ({ $resourceIdentifier })
|
||||
tooltip-status-no-resource = Status
|
||||
tooltip-subscription = Subscription
|
||||
tooltip-full-name = Full Name
|
||||
tooltip-nickname = Nickname
|
||||
tooltip-email = Email
|
||||
tooltip-birthday = Birthday
|
||||
tooltip-user-name = Username
|
||||
tooltip-title = Title
|
||||
tooltip-organization = Organization
|
||||
tooltip-locality = Locality
|
||||
tooltip-country = Country
|
||||
tooltip-telephone = Telephone number
|
||||
|
||||
# LOCALIZATION NOTE (chat-room-field-*):
|
||||
# These are the name of fields displayed in the 'Join Chat' dialog
|
||||
# for XMPP accounts.
|
||||
# The _ character won't be displayed; it indicates the next
|
||||
# character of the string should be used as the access key for this
|
||||
# field.
|
||||
chat-room-field-room = _Room
|
||||
chat-room-field-server = _Server
|
||||
chat-room-field-nick = _Nick
|
||||
chat-room-field-password = _Password
|
||||
|
||||
# LOCALIZATION NOTE (conversation-muc-*):
|
||||
# These are displayed as a system message when a chatroom invitation is
|
||||
# received.
|
||||
# $inviter is the inviter.
|
||||
# $room is the room.
|
||||
# $reason is the reason which is a message provided by the person sending the
|
||||
# invitation.
|
||||
conversation-muc-invitation-with-reason2 = { $inviter } has invited you to join { $room }: { $reason }
|
||||
|
||||
|
||||
# $inviter is the inviter.
|
||||
# $room is the room.
|
||||
# $password is the password of the room.
|
||||
# $reason is the reason which is a message provided by the person sending the
|
||||
# invitation.
|
||||
conversation-muc-invitation-with-reason2-password = { $inviter } has invited you to join { $room } with password { $password }: { $reason }
|
||||
# $inviter is the inviter.
|
||||
# $room is the room.
|
||||
conversation-muc-invitation-without-reason = { $inviter } has invited you to join { $room }
|
||||
# $inviter is the inviter.
|
||||
# $room is the room.
|
||||
# $password is the password of the room.
|
||||
conversation-muc-invitation-without-reason-password = { $inviter } has invited you to join { $room } with password { $password }
|
||||
|
||||
# LOCALIZATION NOTE (conversation-message-join):
|
||||
# This is displayed as a system message when a participant joins room.
|
||||
# $participant is the nick of the participant.
|
||||
conversation-message-join = { $participant } entered the room.
|
||||
|
||||
# LOCALIZATION NOTE (conversation-message-rejoined):
|
||||
# This is displayed as a system message when a participant rejoins room after
|
||||
# parting it.
|
||||
conversation-message-rejoined = You have rejoined the room.
|
||||
|
||||
# LOCALIZATION NOTE (conversation-message-parted-*):
|
||||
# These are displayed as a system message when a participant parts a room.
|
||||
# $message is the part message supplied by the user.
|
||||
conversation-message-parted-you = You have left the room.
|
||||
# $message is the part message supplied by the user.
|
||||
conversation-message-parted-you-reason = You have left the room: { $message }
|
||||
# $participant is the participant that is leaving.
|
||||
conversation-message-parted = { $participant } has left the room.
|
||||
# $participant is the participant that is leaving.
|
||||
# $message is the part message supplied by the participant.
|
||||
conversation-message-parted-reason = { $participant } has left the room: { $message }
|
||||
|
||||
# LOCALIZATION NOTE (conversation-message-invitation-declined*):
|
||||
# $invitee (String) is the invitee that declined the invitation.
|
||||
conversation-message-invitation-declined = { $invitee } has declined your invitation.
|
||||
# $invitee (String) is the invitee that declined the invitation.
|
||||
# $declineMessage (String) is the decline message supplied by the invitee.
|
||||
conversation-message-invitation-declined-reason = { $invitee } has declined your invitation: { $declineMessage }
|
||||
|
||||
# LOCALIZATION NOTE (conversation-message-banned-*):
|
||||
# These are displayed as a system message when a participant is banned from
|
||||
# a room.
|
||||
# $affectedNick (String) is the participant that is banned.
|
||||
conversation-message-banned = { $affectedNick } has been banned from the room.
|
||||
# $affectedNick (String) is the participant that is banned.
|
||||
# $reason (String) is the reason.
|
||||
conversation-message-banned-reason = { $affectedNick } has been banned from the room: { $reason }
|
||||
# $actorNick (String) is the person who is banning.
|
||||
# $affectedNick (String) is the participant that is banned.
|
||||
conversation-message-banned-actor = { $actorNick } has banned { $affectedNick } from the room.
|
||||
# $actorNick (String) is the person who is banning.
|
||||
# $affectedNick (String) is the participant that is banned.
|
||||
# $reason (String) is the reason.
|
||||
conversation-message-banned-actor-reason = { $actorNick } has banned { $affectedNick } from the room: { $reason }
|
||||
conversation-message-banned-you = You have been banned from the room.
|
||||
# $reason (String) is the reason.
|
||||
conversation-message-banned-you-reason = You have been banned from the room: { $reason }
|
||||
# $actorNick (String) is the person who is banning.
|
||||
conversation-message-banned-you-actor = { $actorNick } has banned you from the room.
|
||||
# $actorNick (String) is the person who is banning.
|
||||
# $reason (String) is the reason.
|
||||
conversation-message-banned-you-actor-reason = { $actorNick } has banned you from the room: { $reason }
|
||||
|
||||
# LOCALIZATION NOTE (conversation-message-kicked-*):
|
||||
# These are displayed as a system message when a participant is kicked from
|
||||
# a room.
|
||||
# $affectedNick (String) is the participant that is kicked.
|
||||
conversation-message-kicked = { $affectedNick } has been kicked from the room.
|
||||
# $affectedNick (String) is the participant that is kicked.
|
||||
# $reason (String) is the reason.
|
||||
conversation-message-kicked-reason = { $affectedNick } has been kicked from the room: { $reason }
|
||||
# $actorNick (String) is the person who is kicking.
|
||||
# $affectedNick (String) is the participant that is kicked.
|
||||
conversation-message-kicked-actor = { $actorNick } has kicked { $affectedNick } from the room.
|
||||
# $actorNick (String) is the person who is kicking.
|
||||
# $affectedNick (String) is the participant that is kicked.
|
||||
# $reason (String) is the reason.
|
||||
conversation-message-kicked-actor-reason = { $actorNick } has kicked { $affectedNick } from the room: { $reason }
|
||||
conversation-message-kicked-you = You have been kicked from the room.
|
||||
# $reason (String) is the reason.
|
||||
conversation-message-kicked-you-reason = You have been kicked from the room: { $reason }
|
||||
# $actorNick (String) is the person who is kicking.
|
||||
conversation-message-kicked-you-actor = { $actorNick } has kicked you from the room.
|
||||
# $actorNick (String) is the person who is kicking.
|
||||
# $reason (String) is the reason.
|
||||
conversation-message-kicked-you-actor-reason = { $actorNick } has kicked you from the room: { $reason }
|
||||
|
||||
# LOCALIZATION NOTE (conversation-message-removed-non-member-*):
|
||||
# These are displayed as a system message when a participant is removed from
|
||||
# a room because the room has been changed to members-only.
|
||||
# $affectedNick is the participant that is removed.
|
||||
conversation-message-removed-non-member = { $affectedNick } has been removed from the room because its configuration was changed to members-only.
|
||||
# $affectedNick (String): is the participant that is removed.
|
||||
# $actorNick (String): is the person who changed the room configuration.
|
||||
conversation-message-removed-non-member-actor = { $affectedNick } has been removed from the room because { $actorNick } has changed it to members-only.
|
||||
conversation-message-removed-non-member-you = You have been removed from the room because its configuration has been changed to members-only.
|
||||
# $actorNick (String) is the person who changed the room configuration.
|
||||
conversation-message-removed-non-member-you-actor = You have been removed from the room because { $actorNick } has changed it to members-only.
|
||||
|
||||
# LOCALIZATION NOTE (conversation.message-muc-shutdown):
|
||||
# These are displayed as a system message when a participant is removed from
|
||||
# a room because of a system shutdown.
|
||||
conversation-message-muc-shutdown = You have been removed from the room because of a system shutdown.
|
||||
|
||||
# LOCALIZATION NOTE (conversation-message-version*):
|
||||
# $user (String): is the name of the user whose version was requested.
|
||||
# $clientName (String): is the client name response from the client.
|
||||
# $clientVersion (String): is the client version response from the client.
|
||||
conversation-message-version = { $user } is using "{ $clientName } { $clientVersion }".
|
||||
# $user (String): is the name of the user whose version was requested.
|
||||
# $clientName (String): is the client name response from the client.
|
||||
# $clientVersion (String): is the client version response from the client.
|
||||
# $systemResponse (String): is the operating system(OS) response from the client.
|
||||
conversation-message-version-with-os = { $user } is using "{ $clientName } { $clientVersion }" on { $systemResponse }.
|
||||
|
||||
# LOCALIZATION NOTE (options-*):
|
||||
# These are the protocol specific options shown in the account manager and
|
||||
# account wizard windows.
|
||||
options-resource = Resource
|
||||
options-priority = Priority
|
||||
options-connection-security = Connection security
|
||||
options-connection-security-require-encryption = Require encryption
|
||||
options-connection-security-opportunistic-tls = Use encryption if available
|
||||
options-connection-security-allow-unencrypted-auth = Allow sending the password unencrypted
|
||||
options-connect-server = Server
|
||||
options-connect-port = Port
|
||||
options-domain = Domain
|
||||
|
||||
# LOCALIZATION NOTE (*-protocol-name)
|
||||
# This name is used whenever the name of the protocol is shown.
|
||||
gtalk-protocol-name = Google Talk
|
||||
odnoklassniki-protocol-name = Odnoklassniki
|
||||
|
||||
# LOCALIZATION NOTE (gtalk-disabled):
|
||||
# Google Talk was disabled on June 16, 2022. The message below is a localized
|
||||
# error message to be displayed to users with Google Talk accounts.
|
||||
gtalk-disabled = Google Talk is no longer supported due to Google disabling their XMPP gateway.
|
||||
|
||||
# LOCALIZATION NOTE (odnoklassniki-username-hint):
|
||||
# This is displayed inside the accountUsernameInfoWithDescription
|
||||
# string defined in imAccounts.properties when the user is
|
||||
# configuring a Odnoklassniki account.
|
||||
odnoklassniki-username-hint = Profile ID
|
||||
|
||||
# LOCALIZATION NOTE (command-*):
|
||||
# These are the help messages for each command.
|
||||
# $commandName (String): command name
|
||||
command-join3 = { $commandName } [<room>[@<server>][/<nick>]] [<password>]: Join a room, optionally providing a different server, or nickname, or the room password.
|
||||
# $commandName (String): command name
|
||||
command-part2 = { $commandName } [<message>]: Leave the current room with an optional message.
|
||||
# $commandName (String): command name
|
||||
command-topic = { $commandName } [<new topic>]: Set this room's topic.
|
||||
# $commandName (String): command name
|
||||
command-ban = { $commandName } <nick>[<message>]: Ban someone from the room. You must be a room administrator to do this.
|
||||
# $commandName (String): command name
|
||||
command-kick = { $commandName } <nick>[<message>]: Remove someone from the room. You must be a room moderator to do this.
|
||||
# $commandName (String): command name
|
||||
command-invite = { $commandName } <jid>[<message>]: Invite a user to join the current room with an optional message.
|
||||
# $commandName (String): command name
|
||||
command-inviteto = { $commandName } <room jid>[<password>]: Invite your conversation partner to join a room, together with its password if required.
|
||||
# $commandName (String): command name
|
||||
command-me = { $commandName } <action to perform>: Perform an action.
|
||||
# $commandName (String): command name
|
||||
command-nick = { $commandName } <new nickname>: Change your nickname.
|
||||
# $commandName (String): command name
|
||||
command-msg = { $commandName } <nick> <message>: Send a private message to a participant in the room.
|
||||
# $commandName (String): command name
|
||||
command-version = { $commandName }: Request information about the client your conversation partner is using.
|
|
@ -1,274 +0,0 @@
|
|||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
# LOCALIZATION NOTE (connection.*)
|
||||
# These will be displayed in the account manager in order to show the progress
|
||||
# of the connection.
|
||||
# (These will be displayed in account.connection.progress from
|
||||
# accounts.properties, which adds … at the end, so do not include
|
||||
# periods at the end of these messages.)
|
||||
connection.initializingStream=Initializing stream
|
||||
connection.initializingEncryption=Initializing encryption
|
||||
connection.authenticating=Authenticating
|
||||
connection.gettingResource=Getting resource
|
||||
connection.downloadingRoster=Downloading contact list
|
||||
connection.srvLookup=Looking up the SRV record
|
||||
|
||||
# LOCALIZATION NOTE (connection.error.*)
|
||||
# These will show in the account manager if an error occurs during the
|
||||
# connection attempt.
|
||||
connection.error.invalidUsername=Invalid username (your username should contain an '@' character)
|
||||
connection.error.failedToCreateASocket=Failed to create a socket (Are you offline?)
|
||||
connection.error.serverClosedConnection=The server closed the connection
|
||||
connection.error.resetByPeer=Connection reset by peer
|
||||
connection.error.timedOut=The connection timed out
|
||||
connection.error.receivedUnexpectedData=Received unexpected data
|
||||
connection.error.incorrectResponse=Received an incorrect response
|
||||
connection.error.startTLSRequired=The server requires encryption but you disabled it
|
||||
connection.error.startTLSNotSupported=The server doesn't support encryption but your configuration requires it
|
||||
connection.error.failedToStartTLS=Failed to start encryption
|
||||
connection.error.noAuthMec=No authentication mechanism offered by the server
|
||||
connection.error.noCompatibleAuthMec=None of the authentication mechanisms offered by the server are supported
|
||||
connection.error.notSendingPasswordInClear=The server only supports authentication by sending the password in cleartext
|
||||
connection.error.authenticationFailure=Authentication failure
|
||||
connection.error.notAuthorized=Not authorized (Did you enter the wrong password?)
|
||||
connection.error.failedToGetAResource=Failed to get a resource
|
||||
connection.error.failedMaxResourceLimit=This account is connected from too many places at the same time.
|
||||
connection.error.failedResourceNotValid=Resource is not valid.
|
||||
connection.error.XMPPNotSupported=This server does not support XMPP
|
||||
|
||||
# LOCALIZATION NOTE (conversation.error.notDelivered):
|
||||
# This is displayed in a conversation as an error message when a message
|
||||
# the user has sent wasn't delivered.
|
||||
# %S is replaced by the text of the message that wasn't delivered.
|
||||
conversation.error.notDelivered=This message could not be delivered: %S
|
||||
# This is displayed in a conversation as an error message when joining a MUC
|
||||
# fails.
|
||||
# %S is the name of the MUC.
|
||||
conversation.error.joinFailed=Could not join: %S
|
||||
# This is displayed in a conversation as an error message when the user is
|
||||
# banned from a room.
|
||||
# %S is the name of the MUC room.
|
||||
conversation.error.joinForbidden=Couldn't join %S as you are banned from this room.
|
||||
conversation.error.joinFailedNotAuthorized=Registration required: You are not authorized to join this room.
|
||||
conversation.error.creationFailedNotAllowed=Access restricted: You are not allowed to create rooms.
|
||||
# This is displayed in a conversation as an error message when remote server
|
||||
# is not found.
|
||||
# %S is the name of MUC room.
|
||||
conversation.error.joinFailedRemoteServerNotFound=Could not join the room %S as the server the room is hosted on could not be reached.
|
||||
conversation.error.changeTopicFailedNotAuthorized=You are not authorized to set the topic of this room.
|
||||
# This is displayed in a conversation as an error message when the user sends
|
||||
# a message to a room that he is not in.
|
||||
# %1$S is the name of MUC room.
|
||||
# %2$S is the text of the message that wasn't delivered.
|
||||
conversation.error.sendFailedAsNotInRoom=Message could not be sent to %1$S as you are no longer in the room: %2$S
|
||||
# This is displayed in a conversation as an error message when the user sends
|
||||
# a message to a room that the recipient is not in.
|
||||
# %1$S is the jid of the recipient.
|
||||
# %2$S is the text of the message that wasn't delivered.
|
||||
conversation.error.sendFailedAsRecipientNotInRoom=Message could not be sent to %1$S as the recipient is no longer in the room: %2$S
|
||||
# These are displayed in a conversation as a system error message.
|
||||
conversation.error.remoteServerNotFound=Could not reach the recipient's server.
|
||||
conversation.error.unknownSendError=An unknown error occurred on sending this message.
|
||||
# %S is the name of the message recipient.
|
||||
conversation.error.sendServiceUnavailable=It is not possible to send messages to %S at this time.
|
||||
# %S is the nick of participant that is not in room.
|
||||
conversation.error.nickNotInRoom=%S is not in the room.
|
||||
conversation.error.banCommandAnonymousRoom=You can't ban participants from anonymous rooms. Try /kick instead.
|
||||
conversation.error.banKickCommandNotAllowed=You don't have the required privileges to remove this participant from the room.
|
||||
conversation.error.banKickCommandConflict=Sorry, you can't remove yourself from the room.
|
||||
conversation.error.changeNickFailedConflict=Could not change your nick to %S as this nick is already in use.
|
||||
conversation.error.changeNickFailedNotAcceptable=Could not change your nick to %S as nicks are locked down in this room.
|
||||
conversation.error.inviteFailedForbidden=You don't have the required privileges to invite users to this room.
|
||||
# %S is the jid of user that is invited.
|
||||
conversation.error.failedJIDNotFound=Could not reach %S.
|
||||
# %S is the jid that is invalid.
|
||||
conversation.error.invalidJID=%S is an invalid jid (Jabber identifiers must be of the form user@domain).
|
||||
conversation.error.commandFailedNotInRoom=You have to rejoin the room to be able to use this command.
|
||||
# %S is the name of the recipient.
|
||||
conversation.error.resourceNotAvailable=You must talk first as %S could be connected with more than one client.
|
||||
|
||||
# LOCALIZATION NOTE (conversation.error.version.*):
|
||||
# %S is the name of the recipient.
|
||||
conversation.error.version.unknown=%S's client does not support querying for its software version.
|
||||
|
||||
# LOCALIZATION NOTE (tooltip.*):
|
||||
# These are the titles of lines of information that will appear in
|
||||
# the tooltip showing details about a contact or conversation.
|
||||
# LOCALIZATION NOTE (tooltip.status):
|
||||
# %S will be replaced by the XMPP resource identifier
|
||||
tooltip.status=Status (%S)
|
||||
tooltip.statusNoResource=Status
|
||||
tooltip.subscription=Subscription
|
||||
tooltip.fullName=Full Name
|
||||
tooltip.nickname=Nickname
|
||||
tooltip.email=Email
|
||||
tooltip.birthday=Birthday
|
||||
tooltip.userName=Username
|
||||
tooltip.title=Title
|
||||
tooltip.organization=Organization
|
||||
tooltip.locality=Locality
|
||||
tooltip.country=Country
|
||||
tooltip.telephone=Telephone number
|
||||
|
||||
# LOCALIZATION NOTE (chatRoomField.*):
|
||||
# These are the name of fields displayed in the 'Join Chat' dialog
|
||||
# for XMPP accounts.
|
||||
# The _ character won't be displayed; it indicates the next
|
||||
# character of the string should be used as the access key for this
|
||||
# field.
|
||||
chatRoomField.room=_Room
|
||||
chatRoomField.server=_Server
|
||||
chatRoomField.nick=_Nick
|
||||
chatRoomField.password=_Password
|
||||
|
||||
# LOCALIZATION NOTE (conversation.muc.*):
|
||||
# These are displayed as a system message when a chatroom invitation is
|
||||
# received.
|
||||
# %1$S is the inviter.
|
||||
# %2$S is the room.
|
||||
# %3$S is the reason which is a message provided by the person sending the
|
||||
# invitation.
|
||||
conversation.muc.invitationWithReason2=%1$S has invited you to join %2$S: %3$S
|
||||
# %3$S is the password of the room.
|
||||
# %4$S is the reason which is a message provided by the person sending the
|
||||
# invitation.
|
||||
conversation.muc.invitationWithReason2.password=%1$S has invited you to join %2$S with password %3$S: %4$S
|
||||
conversation.muc.invitationWithoutReason=%1$S has invited you to join %2$S
|
||||
# %3$S is the password of the room.
|
||||
conversation.muc.invitationWithoutReason.password=%1$S has invited you to join %2$S with password %3$S
|
||||
|
||||
# LOCALIZATION NOTE (conversation.muc.join):
|
||||
# This is displayed as a system message when a participant joins room.
|
||||
# %S is the nick of the participant.
|
||||
conversation.message.join=%S entered the room.
|
||||
|
||||
# LOCALIZATION NOTE (conversation.muc.rejoined):
|
||||
# This is displayed as a system message when a participant rejoins room after
|
||||
# parting it.
|
||||
conversation.message.rejoined=You have rejoined the room.
|
||||
|
||||
# LOCALIZATION NOTE (conversation.message.parted.*):
|
||||
# These are displayed as a system message when a participant parts a room.
|
||||
# %S is the part message supplied by the user.
|
||||
conversation.message.parted.you=You have left the room.
|
||||
conversation.message.parted.you.reason=You have left the room: %S
|
||||
# %1$S is the participant that is leaving.
|
||||
# %2$S is the part message supplied by the participant.
|
||||
conversation.message.parted=%1$S has left the room.
|
||||
conversation.message.parted.reason=%1$S has left the room: %2$S
|
||||
|
||||
# LOCALIZATION NOTE (conversation.message.invitationDeclined*):
|
||||
# %1$S is the invitee that declined the invitation.
|
||||
# %2$S is the decline message supplied by the invitee.
|
||||
conversation.message.invitationDeclined=%1$S has declined your invitation.
|
||||
conversation.message.invitationDeclined.reason=%1$S has declined your invitation: %2$S
|
||||
|
||||
# LOCALIZATION NOTE (conversation.message.banned.*):
|
||||
# These are displayed as a system message when a participant is banned from
|
||||
# a room.
|
||||
# %1$S is the participant that is banned.
|
||||
# %2$S is the reason.
|
||||
# %3$S is the person who is banning.
|
||||
conversation.message.banned=%1$S has been banned from the room.
|
||||
conversation.message.banned.reason=%1$S has been banned from the room: %2$S
|
||||
# %1$S is the person who is banning.
|
||||
# %2$S is the participant that is banned.
|
||||
# %3$S is the reason.
|
||||
conversation.message.banned.actor=%1$S has banned %2$S from the room.
|
||||
conversation.message.banned.actor.reason=%1$S has banned %2$S from the room: %3$S
|
||||
conversation.message.banned.you=You have been banned from the room.
|
||||
# %1$S is the reason.
|
||||
conversation.message.banned.you.reason=You have been banned from the room: %1$S
|
||||
# %1$S is the person who is banning.
|
||||
# %2$S is the reason.
|
||||
conversation.message.banned.you.actor=%1$S has banned you from the room.
|
||||
conversation.message.banned.you.actor.reason=%1$S has banned you from the room: %2$S
|
||||
|
||||
# LOCALIZATION NOTE (conversation.message.kicked.*):
|
||||
# These are displayed as a system message when a participant is kicked from
|
||||
# a room.
|
||||
# %1$S is the participant that is kicked.
|
||||
# %2$S is the reason.
|
||||
conversation.message.kicked=%1$S has been kicked from the room.
|
||||
conversation.message.kicked.reason=%1$S has been kicked from the room: %2$S
|
||||
# %1$S is the person who is kicking.
|
||||
# %2$S is the participant that is kicked.
|
||||
# %3$S is the reason.
|
||||
conversation.message.kicked.actor=%1$S has kicked %2$S from the room.
|
||||
conversation.message.kicked.actor.reason=%1$S has kicked %2$S from the room: %3$S
|
||||
conversation.message.kicked.you=You have been kicked from the room.
|
||||
# %1$S is the reason.
|
||||
conversation.message.kicked.you.reason=You have been kicked from the room: %1$S
|
||||
# %1$S is the person who is kicking.
|
||||
# %2$S is the reason.
|
||||
conversation.message.kicked.you.actor=%1$S has kicked you from the room.
|
||||
conversation.message.kicked.you.actor.reason=%1$S has kicked you from the room: %2$S
|
||||
|
||||
# LOCALIZATION NOTE (conversation.message.removedNonMember.*):
|
||||
# These are displayed as a system message when a participant is removed from
|
||||
# a room because the room has been changed to members-only.
|
||||
# %1$S is the participant that is removed.
|
||||
# %2$S is the person who changed the room configuration.
|
||||
conversation.message.removedNonMember=%1$S has been removed from the room because its configuration was changed to members-only.
|
||||
conversation.message.removedNonMember.actor=%1$S has been removed from the room because %2$S has changed it to members-only.
|
||||
conversation.message.removedNonMember.you=You have been removed from the room because its configuration has been changed to members-only.
|
||||
# %1$S is the person who changed the room configuration.
|
||||
conversation.message.removedNonMember.you.actor=You have been removed from the room because %1$S has changed it to members-only.
|
||||
|
||||
# LOCALIZATION NOTE (conversation.message.MUCShutdown):
|
||||
# These are displayed as a system message when a participant is removed from
|
||||
# a room because of a system shutdown.
|
||||
conversation.message.mucShutdown=You have been removed from the room because of a system shutdown.
|
||||
|
||||
# LOCALIZATION NOTE (conversation.message.version*):
|
||||
# %1$S is the name of the user whose version was requested.
|
||||
# %2$S is the client name response from the client.
|
||||
# %3$S is the client version response from the client.
|
||||
# %4$S is the operating system(OS) response from the client.
|
||||
conversation.message.version=%1$S is using "%2$S %3$S".
|
||||
conversation.message.versionWithOS=%1$S is using "%2$S %3$S" on %4$S.
|
||||
|
||||
# LOCALIZATION NOTE (options.*):
|
||||
# These are the protocol specific options shown in the account manager and
|
||||
# account wizard windows.
|
||||
options.resource=Resource
|
||||
options.priority=Priority
|
||||
options.connectionSecurity=Connection security
|
||||
options.connectionSecurity.requireEncryption=Require encryption
|
||||
options.connectionSecurity.opportunisticTLS=Use encryption if available
|
||||
options.connectionSecurity.allowUnencryptedAuth=Allow sending the password unencrypted
|
||||
options.connectServer=Server
|
||||
options.connectPort=Port
|
||||
options.domain=Domain
|
||||
|
||||
# LOCALIZATION NOTE (*.protocolName)
|
||||
# This name is used whenever the name of the protocol is shown.
|
||||
gtalk.protocolName=Google Talk
|
||||
odnoklassniki.protocolName=Odnoklassniki
|
||||
|
||||
# LOCALIZATION NOTE (gtalk.disabled):
|
||||
# Google Talk was disabled on June 16, 2022. The message below is a localized
|
||||
# error message to be displayed to users with Google Talk accounts.
|
||||
gtalk.disabled=Google Talk is no longer supported due to Google disabling their XMPP gateway.
|
||||
|
||||
# LOCALIZATION NOTE (odnoklassniki.usernameHint):
|
||||
# This is displayed inside the accountUsernameInfoWithDescription
|
||||
# string defined in imAccounts.properties when the user is
|
||||
# configuring a Odnoklassniki account.
|
||||
odnoklassniki.usernameHint=Profile ID
|
||||
|
||||
# LOCALZIATION NOTE (command.*):
|
||||
# These are the help messages for each command.
|
||||
command.join3=%S [<room>[@<server>][/<nick>]] [<password>]: Join a room, optionally providing a different server, or nickname, or the room password.
|
||||
command.part2=%S [<message>]: Leave the current room with an optional message.
|
||||
command.topic=%S [<new topic>]: Set this room's topic.
|
||||
command.ban=%S <nick>[<message>]: Ban someone from the room. You must be a room administrator to do this.
|
||||
command.kick=%S <nick>[<message>]: Remove someone from the room. You must be a room moderator to do this.
|
||||
command.invite=%S <jid>[<message>]: Invite a user to join the current room with an optional message.
|
||||
command.inviteto=%S <room jid>[<password>]: Invite your conversation partner to join a room, together with its password if required.
|
||||
command.me=%S <action to perform>: Perform an action.
|
||||
command.nick=%S <new nickname>: Change your nickname.
|
||||
command.msg=%S <nick> <message>: Send a private message to a participant in the room.
|
||||
command.version=%S: Request information about the client your conversation partner is using.
|
|
@ -2,4 +2,4 @@
|
|||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
yahoo.disabled=Yahoo Messenger is no longer supported due to Yahoo disabling their legacy protocol.
|
||||
yahoo-disabled = Yahoo Messenger is no longer supported due to Yahoo disabling their legacy protocol.
|
|
@ -5,19 +5,3 @@
|
|||
|
||||
[localization] @AB_CD@.jar:
|
||||
chat (%**/*.ftl)
|
||||
|
||||
@AB_CD@.jar:
|
||||
% locale chat @AB_CD@ %locale/@AB_CD@/chat/
|
||||
locale/@AB_CD@/chat/accounts.properties (%accounts.properties)
|
||||
locale/@AB_CD@/chat/imtooltip.properties (%imtooltip.properties)
|
||||
locale/@AB_CD@/chat/commands.properties (%commands.properties)
|
||||
locale/@AB_CD@/chat/contacts.properties (%contacts.properties)
|
||||
locale/@AB_CD@/chat/conversations.properties (%conversations.properties)
|
||||
locale/@AB_CD@/chat/facebook.properties (%facebook.properties)
|
||||
locale/@AB_CD@/chat/irc.properties (%irc.properties)
|
||||
locale/@AB_CD@/chat/logger.properties (%logger.properties)
|
||||
locale/@AB_CD@/chat/matrix.properties (%matrix.properties)
|
||||
locale/@AB_CD@/chat/status.properties (%status.properties)
|
||||
locale/@AB_CD@/chat/twitter.properties (%twitter.properties)
|
||||
locale/@AB_CD@/chat/xmpp.properties (%xmpp.properties)
|
||||
locale/@AB_CD@/chat/yahoo.properties (%yahoo.properties)
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import { l10nHelper } from "resource:///modules/imXPCOMUtils.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineLazyGetter(lazy, "_", () =>
|
||||
l10nHelper("chrome://chat/locale/status.properties")
|
||||
ChromeUtils.defineLazyGetter(
|
||||
lazy,
|
||||
"l10n",
|
||||
() => new Localization(["chat/status.ftl"], true)
|
||||
);
|
||||
|
||||
var imIStatusInfo = Ci.imIStatusInfo;
|
||||
|
@ -34,12 +34,17 @@ export var Status = {
|
|||
}
|
||||
|
||||
if (!(aStatusType in this._labels)) {
|
||||
this._labels[aStatusType] = lazy._(aStatusType + "StatusType");
|
||||
this._labels[aStatusType] = lazy.l10n.formatValueSync(
|
||||
`${aStatusType}-status-type`
|
||||
);
|
||||
}
|
||||
|
||||
let label = this._labels[aStatusType];
|
||||
if (aStatusText) {
|
||||
label = lazy._("statusWithStatusMessage", label, aStatusText);
|
||||
label = lazy.l10n.formatValueSync("status-with-status-message", {
|
||||
statusType: label,
|
||||
statusMessage: aStatusText,
|
||||
});
|
||||
}
|
||||
|
||||
return label;
|
||||
|
|
|
@ -7,6 +7,11 @@ const lazy = {};
|
|||
const ParserUtils = Cc["@mozilla.org/parserutils;1"].getService(
|
||||
Ci.nsIParserUtils
|
||||
);
|
||||
ChromeUtils.defineLazyGetter(
|
||||
lazy,
|
||||
"l10n",
|
||||
() => new Localization(["chat/conversations.ftl"], true)
|
||||
);
|
||||
|
||||
var kMessagesStylePrefBranch = "messenger.options.messagesStyle.";
|
||||
var kThemePref = "theme";
|
||||
|
@ -399,9 +404,7 @@ var footerReplacements = {
|
|||
};
|
||||
|
||||
function formatAutoResponce(aTxt) {
|
||||
return Services.strings
|
||||
.createBundle("chrome://chat/locale/conversations.properties")
|
||||
.formatStringFromName("autoReply", [aTxt]);
|
||||
return lazy.l10n.formatValueSync("auto-reply", { message: aTxt });
|
||||
}
|
||||
|
||||
var statusMessageReplacements = {
|
||||
|
@ -858,15 +861,9 @@ export function initHTMLDocument(aConv, aTheme, aDoc) {
|
|||
|
||||
/* Selection stuff */
|
||||
function getEllipsis() {
|
||||
let ellipsis = "[\u2026]";
|
||||
|
||||
try {
|
||||
ellipsis = Services.prefs.getComplexValue(
|
||||
"messenger.conversations.selections.ellipsis",
|
||||
Ci.nsIPrefLocalizedString
|
||||
).data;
|
||||
} catch (e) {}
|
||||
return ellipsis;
|
||||
return lazy.l10n.formatValueSync(
|
||||
"messenger-conversations-selections-ellipsis"
|
||||
);
|
||||
}
|
||||
|
||||
function _serializeDOMObject(aDocument, aInitFunction) {
|
||||
|
@ -1152,35 +1149,21 @@ SelectedMessage.prototype = {
|
|||
}
|
||||
|
||||
// then get the suitable replacements and templates for this message
|
||||
const getLocalizedPrefWithDefault = function (aName, aDefault) {
|
||||
try {
|
||||
const prefBranch = Services.prefs.getBranch(
|
||||
"messenger.conversations.selections."
|
||||
);
|
||||
return prefBranch.getComplexValue(aName, Ci.nsIPrefLocalizedString)
|
||||
.data;
|
||||
} catch (e) {
|
||||
return aDefault;
|
||||
}
|
||||
};
|
||||
let html, replacements;
|
||||
if (msg.system) {
|
||||
replacements = statusReplacements;
|
||||
html = getLocalizedPrefWithDefault(
|
||||
"systemMessagesTemplate",
|
||||
"%time% - %message%"
|
||||
html = lazy.l10n.formatValueSync(
|
||||
"messenger-conversations-selections-system-messages-template"
|
||||
);
|
||||
} else {
|
||||
replacements = messageReplacements;
|
||||
if (msg.action) {
|
||||
html = getLocalizedPrefWithDefault(
|
||||
"actionMessagesTemplate",
|
||||
"%time% * %sender% %message%"
|
||||
html = lazy.l10n.formatValueSync(
|
||||
"messenger-conversations-selections-action-messages-template"
|
||||
);
|
||||
} else {
|
||||
html = getLocalizedPrefWithDefault(
|
||||
"contentMessagesTemplate",
|
||||
"%time% - %sender%: %message%"
|
||||
html = lazy.l10n.formatValueSync(
|
||||
"messenger-conversations-selections-content-messages-template"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,15 +7,16 @@ import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
|||
import {
|
||||
initLogModule,
|
||||
nsSimpleEnumerator,
|
||||
l10nHelper,
|
||||
ClassInfo,
|
||||
} from "resource:///modules/imXPCOMUtils.sys.mjs";
|
||||
import { IMServices } from "resource:///modules/IMServices.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineLazyGetter(lazy, "_", () =>
|
||||
l10nHelper("chrome://chat/locale/conversations.properties")
|
||||
ChromeUtils.defineLazyGetter(
|
||||
lazy,
|
||||
"l10n",
|
||||
() => new Localization(["chat/conversations.ftl"], true)
|
||||
);
|
||||
|
||||
ChromeUtils.defineLazyGetter(lazy, "TXTToHTML", function () {
|
||||
|
@ -1273,16 +1274,26 @@ export var GenericConvChatPrototype = {
|
|||
let message;
|
||||
if (aTopicSetter) {
|
||||
if (aTopic) {
|
||||
message = lazy._("topicChanged", aTopicSetter, lazy.TXTToHTML(aTopic));
|
||||
message = lazy.l10n.formatValueSync("topic-changed", {
|
||||
user: aTopicSetter,
|
||||
topic: lazy.TXTToHTML(aTopic),
|
||||
});
|
||||
} else {
|
||||
message = lazy._("topicCleared", aTopicSetter);
|
||||
message = lazy.l10n.formatValueSync("topic-cleared", {
|
||||
user: aTopicSetter,
|
||||
});
|
||||
}
|
||||
} else {
|
||||
aTopicSetter = null;
|
||||
if (aTopic) {
|
||||
message = lazy._("topicSet", this.name, lazy.TXTToHTML(aTopic));
|
||||
message = lazy.l10n.formatValueSync("topic-set", {
|
||||
conversationName: this.name,
|
||||
topic: lazy.TXTToHTML(aTopic),
|
||||
});
|
||||
} else {
|
||||
message = lazy._("topicNotSet", this.name);
|
||||
message = lazy.l10n.formatValueSync("topic-not-set", {
|
||||
conversationName: this.name,
|
||||
});
|
||||
}
|
||||
}
|
||||
this.writeMessage(aTopicSetter, message, { system: true });
|
||||
|
@ -1337,7 +1348,9 @@ export var GenericConvChatPrototype = {
|
|||
if (isOwnNick) {
|
||||
// If this is the user's nick, change it.
|
||||
this.nick = aNewNick;
|
||||
message = lazy._("nickSet.you", aNewNick);
|
||||
message = lazy.l10n.formatValueSync("nick-set-you", {
|
||||
newNick: aNewNick,
|
||||
});
|
||||
|
||||
// If the account was disconnected, it's OK the user is not a participant.
|
||||
if (!isParticipant) {
|
||||
|
@ -1352,7 +1365,10 @@ export var GenericConvChatPrototype = {
|
|||
);
|
||||
return;
|
||||
} else {
|
||||
message = lazy._("nickSet", aOldNick, aNewNick);
|
||||
message = lazy.l10n.formatValueSync("nick-set-key", {
|
||||
oldNick: aOldNick,
|
||||
newNick: aNewNick,
|
||||
});
|
||||
}
|
||||
|
||||
// Get the original participant and then remove it.
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import { l10nHelper } from "resource:///modules/imXPCOMUtils.sys.mjs";
|
||||
import {
|
||||
GenericAccountPrototype,
|
||||
GenericProtocolPrototype,
|
||||
|
@ -10,8 +9,10 @@ import {
|
|||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineLazyGetter(lazy, "_", () =>
|
||||
l10nHelper("chrome://chat/locale/facebook.properties")
|
||||
ChromeUtils.defineLazyGetter(
|
||||
lazy,
|
||||
"l10n",
|
||||
() => new Localization(["chat/facebook.ftl"], true)
|
||||
);
|
||||
|
||||
function FacebookAccount(aProtoInstance, aImAccount) {
|
||||
|
@ -27,7 +28,7 @@ FacebookAccount.prototype = {
|
|||
);
|
||||
this.reportDisconnecting(
|
||||
Ci.prplIAccount.ERROR_OTHER_ERROR,
|
||||
lazy._("facebook.disabled")
|
||||
lazy.l10n.formatValueSync("facebook-disabled")
|
||||
);
|
||||
this.reportDisconnected();
|
||||
},
|
||||
|
@ -44,7 +45,7 @@ FacebookProtocol.prototype = {
|
|||
return "facebook";
|
||||
},
|
||||
get name() {
|
||||
return lazy._("facebook.chat.name");
|
||||
return lazy.l10n.formatValueSync("facebook-chat-name");
|
||||
},
|
||||
get iconBaseURI() {
|
||||
return "chrome://prpl-facebook/skin/";
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import { l10nHelper } from "resource:///modules/imXPCOMUtils.sys.mjs";
|
||||
import {
|
||||
GenericAccountPrototype,
|
||||
GenericProtocolPrototype,
|
||||
|
@ -10,8 +9,10 @@ import {
|
|||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineLazyGetter(lazy, "_", () =>
|
||||
l10nHelper("chrome://chat/locale/xmpp.properties")
|
||||
ChromeUtils.defineLazyGetter(
|
||||
lazy,
|
||||
"l10n",
|
||||
() => new Localization(["chat/xmpp.ftl"], true)
|
||||
);
|
||||
|
||||
function GTalkAccount(aProtoInstance, aImAccount) {
|
||||
|
@ -26,7 +27,7 @@ GTalkAccount.prototype = {
|
|||
);
|
||||
this.reportDisconnecting(
|
||||
Ci.prplIAccount.ERROR_OTHER_ERROR,
|
||||
lazy._("gtalk.disabled")
|
||||
lazy.l10n.formatValueSync("gtalk-disabled")
|
||||
);
|
||||
this.reportDisconnected();
|
||||
},
|
||||
|
@ -43,7 +44,7 @@ GTalkProtocol.prototype = {
|
|||
return "gtalk";
|
||||
},
|
||||
get name() {
|
||||
return lazy._("gtalk.protocolName");
|
||||
return lazy.l10n.formatValueSync("gtalk-protocol-name");
|
||||
},
|
||||
get iconBaseURI() {
|
||||
return "chrome://prpl-gtalk/skin/";
|
||||
|
|
|
@ -2,14 +2,16 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import { l10nHelper } from "resource:///modules/imXPCOMUtils.sys.mjs";
|
||||
import { GenericProtocolPrototype } from "resource:///modules/jsProtoHelper.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineLazyGetter(lazy, "_", () =>
|
||||
l10nHelper("chrome://chat/locale/irc.properties")
|
||||
ChromeUtils.defineLazyGetter(
|
||||
lazy,
|
||||
"l10n",
|
||||
() => new Localization(["chat/irc.ftl"], true)
|
||||
);
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
ircAccount: "resource:///modules/ircAccount.sys.mjs",
|
||||
});
|
||||
|
@ -35,13 +37,13 @@ ircProtocol.prototype = {
|
|||
return "chrome://prpl-irc/skin/";
|
||||
},
|
||||
get usernameEmptyText() {
|
||||
return lazy._("irc.usernameHint");
|
||||
return lazy.l10n.formatValueSync("irc-username-hint");
|
||||
},
|
||||
|
||||
usernameSplits: [
|
||||
{
|
||||
get label() {
|
||||
return lazy._("options.server");
|
||||
return lazy.l10n.formatValueSync("options-server");
|
||||
},
|
||||
separator: "@",
|
||||
defaultValue: "irc.libera.chat",
|
||||
|
@ -59,26 +61,26 @@ ircProtocol.prototype = {
|
|||
options: {
|
||||
port: {
|
||||
get label() {
|
||||
return lazy._("options.port");
|
||||
return lazy.l10n.formatValueSync("options-port");
|
||||
},
|
||||
default: 6697,
|
||||
},
|
||||
ssl: {
|
||||
get label() {
|
||||
return lazy._("options.ssl");
|
||||
return lazy.l10n.formatValueSync("options-ssl");
|
||||
},
|
||||
default: true,
|
||||
},
|
||||
// TODO We should attempt to auto-detect encoding instead.
|
||||
encoding: {
|
||||
get label() {
|
||||
return lazy._("options.encoding");
|
||||
return lazy.l10n.formatValueSync("options-encoding");
|
||||
},
|
||||
default: "UTF-8",
|
||||
},
|
||||
quitmsg: {
|
||||
get label() {
|
||||
return lazy._("options.quitMessage");
|
||||
return lazy.l10n.formatValueSync("options-quit-message");
|
||||
},
|
||||
get default() {
|
||||
return Services.prefs.getCharPref("chat.irc.defaultQuitMessage");
|
||||
|
@ -86,19 +88,19 @@ ircProtocol.prototype = {
|
|||
},
|
||||
partmsg: {
|
||||
get label() {
|
||||
return lazy._("options.partMessage");
|
||||
return lazy.l10n.formatValueSync("options-part-message");
|
||||
},
|
||||
default: "",
|
||||
},
|
||||
showServerTab: {
|
||||
get label() {
|
||||
return lazy._("options.showServerTab");
|
||||
return lazy.l10n.formatValueSync("options-show-server-tab");
|
||||
},
|
||||
default: false,
|
||||
},
|
||||
alternateNicks: {
|
||||
get label() {
|
||||
return lazy._("options.alternateNicks");
|
||||
return lazy.l10n.formatValueSync("options-alternate-nicks");
|
||||
},
|
||||
default: "",
|
||||
},
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
import {
|
||||
ClassInfo,
|
||||
executeSoon,
|
||||
l10nHelper,
|
||||
nsSimpleEnumerator,
|
||||
} from "resource:///modules/imXPCOMUtils.sys.mjs";
|
||||
import { clearTimeout, setTimeout } from "resource://gre/modules/Timer.sys.mjs";
|
||||
|
@ -30,15 +29,13 @@ const lazy = {};
|
|||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
DownloadUtils: "resource://gre/modules/DownloadUtils.sys.mjs",
|
||||
PluralForm: "resource:///modules/PluralForm.sys.mjs",
|
||||
ircHandlers: "resource:///modules/ircHandlers.sys.mjs",
|
||||
});
|
||||
|
||||
ChromeUtils.defineLazyGetter(lazy, "_conv", () =>
|
||||
l10nHelper("chrome://chat/locale/conversations.properties")
|
||||
);
|
||||
ChromeUtils.defineLazyGetter(lazy, "_", () =>
|
||||
l10nHelper("chrome://chat/locale/irc.properties")
|
||||
ChromeUtils.defineLazyGetter(
|
||||
lazy,
|
||||
"l10n",
|
||||
() => new Localization(["chat/conversations.ftl", "chat/irc.ftl"], true)
|
||||
);
|
||||
|
||||
/*
|
||||
|
@ -303,7 +300,7 @@ export var GenericIRCConversation = {
|
|||
if (!this._account.sendCTCPMessage(this.name, false, "ACTION", message)) {
|
||||
this.writeMessage(
|
||||
this._account._currentServerName,
|
||||
lazy._("error.sendMessageFailed"),
|
||||
lazy.l10n.formatValueSync("error-send-message-failed"),
|
||||
{
|
||||
error: true,
|
||||
system: true,
|
||||
|
@ -319,7 +316,7 @@ export var GenericIRCConversation = {
|
|||
) {
|
||||
this.writeMessage(
|
||||
this._account._currentServerName,
|
||||
lazy._("error.sendMessageFailed"),
|
||||
lazy.l10n.formatValueSync("error-send-message-failed"),
|
||||
{
|
||||
error: true,
|
||||
system: true,
|
||||
|
@ -404,22 +401,33 @@ export var GenericIRCConversation = {
|
|||
const type = { system: true, noLog: true };
|
||||
// RFC 2812 errors 401 and 406 result in there being no entry for the nick.
|
||||
if (!account.whoisInformation.has(nick)) {
|
||||
this.writeMessage(null, lazy._("message.unknownNick", nick), type);
|
||||
this.writeMessage(
|
||||
null,
|
||||
lazy.l10n.formatValueSync("message-unknown-nick", { nick }),
|
||||
type
|
||||
);
|
||||
return;
|
||||
}
|
||||
// If the nick is offline, tell the user. In that case, it's WHOWAS info.
|
||||
let msgType = "message.whois";
|
||||
let msgType = "message-whois";
|
||||
if ("offline" in account.whoisInformation.get(nick)) {
|
||||
msgType = "message.whowas";
|
||||
msgType = "message-whowas";
|
||||
}
|
||||
let msg = lazy._(msgType, account.whoisInformation.get(nick).nick);
|
||||
let msg = lazy.l10n.formatValueSync(msgType, {
|
||||
nick: account.whoisInformation.get(nick).nick,
|
||||
});
|
||||
|
||||
// Iterate over each field.
|
||||
for (const elt of aSubject.QueryInterface(Ci.nsISimpleEnumerator)) {
|
||||
switch (elt.type) {
|
||||
case Ci.prplITooltipInfo.pair:
|
||||
case Ci.prplITooltipInfo.sectionHeader:
|
||||
msg += "\n" + lazy._("message.whoisEntry", elt.label, elt.value);
|
||||
msg +=
|
||||
"\n" +
|
||||
lazy.l10n.formatValueSync("message-whois-entry", {
|
||||
description: elt.label,
|
||||
value: elt.value,
|
||||
});
|
||||
break;
|
||||
case Ci.prplITooltipInfo.sectionBreak:
|
||||
break;
|
||||
|
@ -430,7 +438,10 @@ export var GenericIRCConversation = {
|
|||
// The away message has no tooltipInfo.pair entry.
|
||||
msg +=
|
||||
"\n" +
|
||||
lazy._("message.whoisEntry", lazy._("tooltip.away"), elt.value);
|
||||
lazy.l10n.formatValueSync("message-whois-entry", {
|
||||
description: lazy.l10n.formatValueSync("tooltip-away"),
|
||||
value: elt.value,
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -591,10 +602,15 @@ ircChannel.prototype = {
|
|||
) {
|
||||
continue;
|
||||
}
|
||||
msg = lazy._("message.channelKeyAdded", aSetter, key);
|
||||
msg = lazy.l10n.formatValueSync("message-channel-key-added", {
|
||||
nick: aSetter,
|
||||
newPassword: key,
|
||||
});
|
||||
newFields += " " + key;
|
||||
} else {
|
||||
msg = lazy._("message.channelKeyRemoved", aSetter);
|
||||
msg = lazy.l10n.formatValueSync("message-channel-key-removed", {
|
||||
nick: aSetter,
|
||||
});
|
||||
}
|
||||
|
||||
this.writeMessage(aSetter, msg, { system: true });
|
||||
|
@ -604,17 +620,24 @@ ircChannel.prototype = {
|
|||
} else if (aNewMode[i] == "b") {
|
||||
// A banmask was added or removed.
|
||||
const banMask = getNextParam();
|
||||
let msgKey = "message.banMask";
|
||||
let msgKey = "message-ban-mask";
|
||||
if (addNewMode) {
|
||||
this.banMasks.push(banMask);
|
||||
msgKey += "Added";
|
||||
msgKey += "-added";
|
||||
} else {
|
||||
this.banMasks = this.banMasks.filter(aBanMask => banMask != aBanMask);
|
||||
msgKey += "Removed";
|
||||
msgKey += "-removed";
|
||||
}
|
||||
this.writeMessage(aSetter, lazy._(msgKey, banMask, aSetter), {
|
||||
system: true,
|
||||
});
|
||||
this.writeMessage(
|
||||
aSetter,
|
||||
lazy.l10n.formatValueSync(msgKey, {
|
||||
locationMatches: banMask,
|
||||
nick: aSetter,
|
||||
}),
|
||||
{
|
||||
system: true,
|
||||
}
|
||||
);
|
||||
} else if (["e", "I", "l"].includes(aNewMode[i])) {
|
||||
// TODO The following have parameters that must be accounted for.
|
||||
getNextParam();
|
||||
|
@ -659,11 +682,10 @@ ircChannel.prototype = {
|
|||
_setMode.call(this, addNewMode, channelModes);
|
||||
|
||||
// Notify the UI of changes.
|
||||
msg = lazy._(
|
||||
"message.channelmode",
|
||||
aNewMode[0] + channelModes.join(""),
|
||||
aSetter
|
||||
);
|
||||
msg = lazy.l10n.formatValueSync("message-channelmode", {
|
||||
mode: aNewMode[0] + channelModes.join(""),
|
||||
user: aSetter,
|
||||
});
|
||||
this.writeMessage(aSetter, msg, { system: true });
|
||||
|
||||
this._receivedInitialMode = true;
|
||||
|
@ -740,12 +762,11 @@ ircParticipant.prototype = {
|
|||
_setMode.call(this, aAddNewMode, aNewModes);
|
||||
|
||||
// Notify the UI of changes.
|
||||
const msg = lazy._(
|
||||
"message.usermode",
|
||||
(aAddNewMode ? "+" : "-") + aNewModes.join(""),
|
||||
this.name,
|
||||
aSetter
|
||||
);
|
||||
const msg = lazy.l10n.formatValueSync("message-usermode", {
|
||||
mode: (aAddNewMode ? "+" : "-") + aNewModes.join(""),
|
||||
targetUser: this.name,
|
||||
sourceUser: aSetter,
|
||||
});
|
||||
this._conv.writeMessage(aSetter, msg, { system: true });
|
||||
this._conv.notifyObservers(this, "chat-buddy-update");
|
||||
},
|
||||
|
@ -919,7 +940,7 @@ ircSocket.prototype = {
|
|||
this.WARN(msg);
|
||||
this._account.gotDisconnected(
|
||||
Ci.prplIAccount.ERROR_NETWORK_ERROR,
|
||||
lazy._("connection.error.lost")
|
||||
lazy.l10n.formatValueSync("connection-error-lost")
|
||||
);
|
||||
}
|
||||
},
|
||||
|
@ -927,14 +948,14 @@ ircSocket.prototype = {
|
|||
this.WARN("Connection reset.");
|
||||
this._account.gotDisconnected(
|
||||
Ci.prplIAccount.ERROR_NETWORK_ERROR,
|
||||
lazy._("connection.error.lost")
|
||||
lazy.l10n.formatValueSync("connection-error-lost")
|
||||
);
|
||||
},
|
||||
onConnectionTimedOut() {
|
||||
this.WARN("Connection timed out.");
|
||||
this._account.gotDisconnected(
|
||||
Ci.prplIAccount.ERROR_NETWORK_ERROR,
|
||||
lazy._("connection.error.timeOut")
|
||||
lazy.l10n.formatValueSync("connection-error-time-out")
|
||||
);
|
||||
},
|
||||
onConnectionSecurityError(aTLSError, aNSSErrorMessage) {
|
||||
|
@ -1193,14 +1214,15 @@ ircAccount.prototype = {
|
|||
if (this._showServerTab) {
|
||||
let msg;
|
||||
if (aDisplayFullMode) {
|
||||
msg = lazy._("message.yourmode", Array.from(this._modes).join(""));
|
||||
msg = lazy.l10n.formatValueSync("message-yourmode", {
|
||||
mode: Array.from(this._modes).join(""),
|
||||
});
|
||||
} else {
|
||||
msg = lazy._(
|
||||
"message.usermode",
|
||||
aNewModes,
|
||||
aNick,
|
||||
aSetter || this._currentServerName
|
||||
);
|
||||
msg = lazy.l10n.formatValueSync("message-usermode", {
|
||||
mode: aNewModes,
|
||||
targetUser: aNick,
|
||||
sourceUser: aSetter || this._currentServerName,
|
||||
});
|
||||
}
|
||||
this.getConversation(this._currentServerName).writeMessage(
|
||||
this._currentServerName,
|
||||
|
@ -1425,10 +1447,12 @@ ircAccount.prototype = {
|
|||
|
||||
const whoisInformation = this.whoisInformation.get(aNick);
|
||||
if (whoisInformation.serverName && whoisInformation.serverInfo) {
|
||||
whoisInformation.server = lazy._(
|
||||
"tooltip.serverValue",
|
||||
whoisInformation.serverName,
|
||||
whoisInformation.serverInfo
|
||||
whoisInformation.server = lazy.l10n.formatValueSync(
|
||||
"tooltip-server-value",
|
||||
{
|
||||
serverName: whoisInformation.serverName,
|
||||
serverInformation: whoisInformation.serverInfo,
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -1446,7 +1470,8 @@ ircAccount.prototype = {
|
|||
channels.trim().split(/\s+/).sort(sortWithoutPrefix).join(" ");
|
||||
|
||||
// Convert booleans into a human-readable form.
|
||||
const normalizeBool = aBool => lazy._(aBool ? "yes" : "no");
|
||||
const normalizeBool = aBool =>
|
||||
lazy.l10n.formatValueSync(aBool ? "yes-key-key" : "no-key-key");
|
||||
|
||||
// Convert timespan in seconds into a human-readable form.
|
||||
const normalizeTime = function (aTime) {
|
||||
|
@ -1456,7 +1481,9 @@ ircAccount.prototype = {
|
|||
if (!valuesAndUnits[2]) {
|
||||
valuesAndUnits.splice(2, 2);
|
||||
}
|
||||
return lazy._("tooltip.timespan", valuesAndUnits.join(" "));
|
||||
return lazy.l10n.formatValueSync("tooltip-timespan", {
|
||||
timespan: valuesAndUnits.join(" "),
|
||||
});
|
||||
};
|
||||
|
||||
// List of the names of the info to actually show in the tooltip and
|
||||
|
@ -1475,6 +1502,18 @@ ircAccount.prototype = {
|
|||
lastActivity: normalizeTime,
|
||||
channels: sortChannels,
|
||||
};
|
||||
const tooltipMessages = {
|
||||
realname: "tooltip-realname",
|
||||
server: "tooltip-server",
|
||||
connectedFrom: "tooltip-connected-from",
|
||||
registered: "tooltip-registered",
|
||||
registeredAs: "tooltip-registered-as",
|
||||
secure: "tooltip-secure",
|
||||
ircOp: "tooltip-irc-op",
|
||||
bot: "tooltip-bot",
|
||||
lastActivity: "tooltip-last-activity",
|
||||
channels: "tooltip-channels",
|
||||
};
|
||||
|
||||
const tooltipInfo = [];
|
||||
for (const field in kFields) {
|
||||
|
@ -1483,7 +1522,12 @@ ircAccount.prototype = {
|
|||
if (kFields[field]) {
|
||||
value = kFields[field](value);
|
||||
}
|
||||
tooltipInfo.push(new TooltipInfo(lazy._("tooltip." + field), value));
|
||||
tooltipInfo.push(
|
||||
new TooltipInfo(
|
||||
lazy.l10n.formatValueSync(tooltipMessages[field]),
|
||||
value
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1581,7 +1625,7 @@ ircAccount.prototype = {
|
|||
} else {
|
||||
conversation.writeMessage(
|
||||
aOldNick,
|
||||
lazy._conv("nickSet.you", aNewNick),
|
||||
lazy.l10n.formatValueSync("nick-set-you", { newNick: aNewNick }),
|
||||
{
|
||||
system: true,
|
||||
}
|
||||
|
@ -1613,7 +1657,10 @@ ircAccount.prototype = {
|
|||
conversation.updateNick(aNewNick);
|
||||
conversation.writeMessage(
|
||||
aOldNick,
|
||||
lazy._conv("nickSet", aOldNick, aNewNick),
|
||||
lazy.l10n.formatValueSync("nick-set-key", {
|
||||
oldNick: aOldNick,
|
||||
newNick: aNewNick,
|
||||
}),
|
||||
{ system: true }
|
||||
);
|
||||
}
|
||||
|
@ -1702,7 +1749,9 @@ ircAccount.prototype = {
|
|||
// The nick we were about to try next is our current nick. This means
|
||||
// the user attempted to change to a version of the nick with a lower or
|
||||
// absent number suffix, and this failed.
|
||||
const msg = lazy._("message.nick.fail", this._nickname);
|
||||
const msg = lazy.l10n.formatValueSync("message-nick-fail", {
|
||||
nick: this._nickname,
|
||||
});
|
||||
this.conversations.forEach(conversation =>
|
||||
conversation.writeMessage(this._nickname, msg, { system: true })
|
||||
);
|
||||
|
@ -1735,11 +1784,11 @@ ircAccount.prototype = {
|
|||
this.WARN(aSource + " returned an invalid delay from a PING: " + delay);
|
||||
return false;
|
||||
}
|
||||
|
||||
const msg = lazy.PluralForm.get(
|
||||
const msg = lazy.l10n.formatValueSync("message-ping", {
|
||||
source: aSource,
|
||||
delay,
|
||||
lazy._("message.ping", aSource)
|
||||
).replace("#2", delay);
|
||||
});
|
||||
|
||||
this.getConversation(aSource).writeMessage(aSource, msg, { system: true });
|
||||
return true;
|
||||
},
|
||||
|
@ -1989,13 +2038,13 @@ ircAccount.prototype = {
|
|||
chatRoomFields: {
|
||||
channel: {
|
||||
get label() {
|
||||
return lazy._("joinChat.channel");
|
||||
return lazy.l10n.formatValueSync("join-chat-channel");
|
||||
},
|
||||
required: true,
|
||||
},
|
||||
password: {
|
||||
get label() {
|
||||
return lazy._("joinChat.password");
|
||||
return lazy.l10n.formatValueSync("join-chat-password");
|
||||
},
|
||||
isPassword: true,
|
||||
},
|
||||
|
@ -2102,7 +2151,7 @@ ircAccount.prototype = {
|
|||
if (!this._socket || this._socket.disconnected) {
|
||||
this.gotDisconnected(
|
||||
Ci.prplIAccount.ERROR_NETWORK_ERROR,
|
||||
lazy._("connection.error.lost")
|
||||
lazy.l10n.formatValueSync("connection-error-lost")
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -2139,7 +2188,7 @@ ircAccount.prototype = {
|
|||
this.ERROR("Socket error:", e);
|
||||
this.gotDisconnected(
|
||||
Ci.prplIAccount.ERROR_NETWORK_ERROR,
|
||||
lazy._("connection.error.lost")
|
||||
lazy.l10n.formatValueSync("connection-error-lost")
|
||||
);
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -17,10 +17,7 @@
|
|||
* RFC 1459: Internet Relay Chat Protocol
|
||||
* http://tools.ietf.org/html/rfc1459
|
||||
*/
|
||||
import {
|
||||
l10nHelper,
|
||||
nsSimpleEnumerator,
|
||||
} from "resource:///modules/imXPCOMUtils.sys.mjs";
|
||||
import { nsSimpleEnumerator } from "resource:///modules/imXPCOMUtils.sys.mjs";
|
||||
import { clearTimeout, setTimeout } from "resource://gre/modules/Timer.sys.mjs";
|
||||
import { ircHandlerPriorities } from "resource:///modules/ircHandlerPriorities.sys.mjs";
|
||||
import {
|
||||
|
@ -31,28 +28,51 @@ import {
|
|||
} from "resource:///modules/ircUtils.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
ChromeUtils.defineLazyGetter(lazy, "_", () =>
|
||||
l10nHelper("chrome://chat/locale/irc.properties")
|
||||
ChromeUtils.defineLazyGetter(
|
||||
lazy,
|
||||
"l10n",
|
||||
() => new Localization(["chat/irc.ftl"], true)
|
||||
);
|
||||
|
||||
// Display the message and remove them from the rooms they're in.
|
||||
function leftRoom(aAccount, aNicks, aChannels, aSource, aReason, aKicked) {
|
||||
const msgId = "message." + (aKicked ? "kicked" : "parted");
|
||||
// If a part message was included, include it.
|
||||
const reason = aReason ? lazy._(msgId + ".reason", aReason) : "";
|
||||
let reason = "";
|
||||
if (aReason) {
|
||||
if (aKicked) {
|
||||
reason = lazy.l10n.formatValueSync("message-kicked-reason", {
|
||||
kickMessage: aReason,
|
||||
});
|
||||
}
|
||||
reason = lazy.l10n.formatValueSync("message-parted-reason", {
|
||||
partMessage: aReason,
|
||||
});
|
||||
}
|
||||
|
||||
function __(aNick, aYou) {
|
||||
// If the user is kicked, we need to say who kicked them.
|
||||
const msgId2 = msgId + (aYou ? ".you" : "");
|
||||
if (aKicked) {
|
||||
if (aYou) {
|
||||
return lazy._(msgId2, aSource, reason);
|
||||
return lazy.l10n.formatValueSync("message-kicked-you", {
|
||||
nick: aSource,
|
||||
messageKickedReason: reason,
|
||||
});
|
||||
}
|
||||
return lazy._(msgId2, aNick, aSource, reason);
|
||||
return lazy.l10n.formatValueSync("message-kicked", {
|
||||
kickedNick: aNick,
|
||||
kickerNick: aSource,
|
||||
messageKickedReason: reason,
|
||||
});
|
||||
}
|
||||
if (aYou) {
|
||||
return lazy._(msgId2, reason);
|
||||
return lazy.l10n.formatValueSync("message-parted-you", {
|
||||
messagePartedReason: reason,
|
||||
});
|
||||
}
|
||||
return lazy._(msgId2, aNick, reason);
|
||||
return lazy.l10n.formatValueSync("message-parted", {
|
||||
messagePartedReason: aNick,
|
||||
partMessage: reason,
|
||||
});
|
||||
}
|
||||
|
||||
for (const channelName of aChannels) {
|
||||
|
@ -166,7 +186,7 @@ export var ircBase = {
|
|||
this.WARN("Received unexpected ERROR response:\n" + aMessage.params[0]);
|
||||
this.gotDisconnected(
|
||||
Ci.prplIAccount.ERROR_NETWORK_ERROR,
|
||||
lazy._("connection.error.lost")
|
||||
lazy.l10n.formatValueSync("connection-error-lost")
|
||||
);
|
||||
} else {
|
||||
// We received an ERROR message when expecting it (i.e. we've sent a
|
||||
|
@ -189,7 +209,10 @@ export var ircBase = {
|
|||
// Otherwise just notify the user.
|
||||
this.getConversation(channel).writeMessage(
|
||||
aMessage.origin,
|
||||
lazy._("message.inviteReceived", aMessage.origin, channel),
|
||||
lazy.l10n.formatValueSync("message-invite-received", {
|
||||
nick: aMessage.origin,
|
||||
conversationName: channel,
|
||||
}),
|
||||
{ system: true }
|
||||
);
|
||||
}
|
||||
|
@ -224,7 +247,7 @@ export var ircBase = {
|
|||
if (conversation._rejoined) {
|
||||
conversation.writeMessage(
|
||||
aMessage.origin,
|
||||
lazy._("message.rejoined"),
|
||||
lazy.l10n.formatValueSync("message-rejoined"),
|
||||
{
|
||||
system: true,
|
||||
}
|
||||
|
@ -245,7 +268,10 @@ export var ircBase = {
|
|||
// Don't worry about adding ourself, RPL_NAMREPLY takes care of that
|
||||
// case.
|
||||
conversation.getParticipant(aMessage.origin, true);
|
||||
const msg = lazy._("message.join", aMessage.origin, aMessage.source);
|
||||
const msg = lazy.l10n.formatValueSync("message-join", {
|
||||
nick: aMessage.origin,
|
||||
nickAndHost: aMessage.source,
|
||||
});
|
||||
conversation.writeMessage(aMessage.origin, msg, {
|
||||
system: true,
|
||||
noLinkification: true,
|
||||
|
@ -355,11 +381,12 @@ export var ircBase = {
|
|||
}
|
||||
// If a quit message was included, show it.
|
||||
const nick = aMessage.origin;
|
||||
const msg = lazy._(
|
||||
"message.quit",
|
||||
const msg = lazy.l10n.formatValueSync("message-quit", {
|
||||
nick,
|
||||
quitMsg.length ? lazy._("message.quit2", quitMsg) : ""
|
||||
);
|
||||
quitMessage: quitMsg.length
|
||||
? lazy.l10n.formatValueSync("message-quit2", { nick: quitMsg })
|
||||
: "",
|
||||
});
|
||||
// Loop over every conversation with the user and display that they quit.
|
||||
this.conversations.forEach(conversation => {
|
||||
if (conversation.isChat && conversation._participants.has(nick)) {
|
||||
|
@ -1028,7 +1055,10 @@ export var ircBase = {
|
|||
// above (which is as specified by RFC 2812).
|
||||
this.getConversation(aMessage.params[2]).writeMessage(
|
||||
aMessage.origin,
|
||||
lazy._("message.invited", aMessage.params[1], aMessage.params[2]),
|
||||
lazy.l10n.formatValueSync("message-invited", {
|
||||
nick: aMessage.params[1],
|
||||
conversationName: aMessage.params[2],
|
||||
}),
|
||||
{ system: true }
|
||||
);
|
||||
return true;
|
||||
|
@ -1039,7 +1069,9 @@ export var ircBase = {
|
|||
return writeMessage(
|
||||
this,
|
||||
aMessage,
|
||||
lazy._("message.summoned", aMessage.params[0])
|
||||
lazy.l10n.formatValueSync("message-summoned", {
|
||||
nick: aMessage.params[0],
|
||||
})
|
||||
);
|
||||
},
|
||||
346() {
|
||||
|
@ -1185,11 +1217,17 @@ export var ircBase = {
|
|||
const conv = this.getConversation(aMessage.params[1]);
|
||||
let msg;
|
||||
if (conv.banMasks.length) {
|
||||
msg = [lazy._("message.banMasks", aMessage.params[1])]
|
||||
msg = [
|
||||
lazy.l10n.formatValueSync("message-ban-masks", {
|
||||
place: aMessage.params[1],
|
||||
}),
|
||||
]
|
||||
.concat(conv.banMasks)
|
||||
.join("\n");
|
||||
} else {
|
||||
msg = lazy._("message.noBanMasks", aMessage.params[1]);
|
||||
msg = lazy.l10n.formatValueSync("message-no-ban-masks", {
|
||||
place: aMessage.params[1],
|
||||
});
|
||||
}
|
||||
conv.writeMessage(aMessage.origin, msg, { system: true });
|
||||
return true;
|
||||
|
@ -1284,7 +1322,10 @@ export var ircBase = {
|
|||
// RPL_TIME
|
||||
// <server> :<string showing server's local time>
|
||||
|
||||
const msg = lazy._("ctcp.time", aMessage.params[1], aMessage.params[2]);
|
||||
const msg = lazy.l10n.formatValueSync("ctcp-time", {
|
||||
username: aMessage.params[1],
|
||||
timeResponse: aMessage.params[2],
|
||||
});
|
||||
// Show the date returned from the server, note that this doesn't use
|
||||
// the serverMessage function: since this is in response to a command, it
|
||||
// should always be shown.
|
||||
|
@ -1321,9 +1362,8 @@ export var ircBase = {
|
|||
// <nickname> :No such nick/channel
|
||||
// Can arise in response to /mode, /invite, /kill, /msg, /whois.
|
||||
// TODO Handled in the conversation for /whois and /mgs so far.
|
||||
const msgId =
|
||||
"error.noSuch" +
|
||||
(this.isMUCName(aMessage.params[1]) ? "Channel" : "Nick");
|
||||
const msgSuffix = this.isMUCName(aMessage.params[1]) ? "channel" : "nick";
|
||||
const msgId = `error-no-such-${msgSuffix}`;
|
||||
if (this.conversations.has(aMessage.params[1])) {
|
||||
// If the conversation exists and we just sent a message from it, then
|
||||
// notify that the user is offline.
|
||||
|
@ -1335,7 +1375,9 @@ export var ircBase = {
|
|||
return serverErrorMessage(
|
||||
this,
|
||||
aMessage,
|
||||
lazy._(msgId, aMessage.params[1])
|
||||
lazy.l10n.formatValueSync(msgId, {
|
||||
name: aMessage.params[1],
|
||||
})
|
||||
);
|
||||
},
|
||||
402() {
|
||||
|
@ -1350,7 +1392,7 @@ export var ircBase = {
|
|||
return conversationErrorMessage(
|
||||
this,
|
||||
aMessage,
|
||||
"error.noChannel",
|
||||
"error-no-channel",
|
||||
true,
|
||||
false
|
||||
);
|
||||
|
@ -1362,7 +1404,7 @@ export var ircBase = {
|
|||
return conversationErrorMessage(
|
||||
this,
|
||||
aMessage,
|
||||
"error.cannotSendToChannel"
|
||||
"error-cannot-send-to-channel"
|
||||
);
|
||||
},
|
||||
405(aMessage) {
|
||||
|
@ -1371,7 +1413,7 @@ export var ircBase = {
|
|||
return conversationErrorMessage(
|
||||
this,
|
||||
aMessage,
|
||||
"error.tooManyChannels",
|
||||
"error-too-many-channels",
|
||||
true
|
||||
);
|
||||
},
|
||||
|
@ -1382,7 +1424,9 @@ export var ircBase = {
|
|||
return serverErrorMessage(
|
||||
this,
|
||||
aMessage,
|
||||
lazy._("error.wasNoSuchNick", aMessage.params[1])
|
||||
lazy.l10n.formatValueSync("error-was-no-such-nick", {
|
||||
name: aMessage.params[1],
|
||||
})
|
||||
);
|
||||
},
|
||||
407(aMessage) {
|
||||
|
@ -1391,7 +1435,7 @@ export var ircBase = {
|
|||
return conversationErrorMessage(
|
||||
this,
|
||||
aMessage,
|
||||
"error.nonUniqueTarget",
|
||||
"error-non-unique-target",
|
||||
false,
|
||||
false
|
||||
);
|
||||
|
@ -1477,7 +1521,9 @@ export var ircBase = {
|
|||
432(aMessage) {
|
||||
// ERR_ERRONEUSNICKNAME
|
||||
// <nick> :Erroneous nickname
|
||||
const msg = lazy._("error.erroneousNickname", this._requestedNickname);
|
||||
const msg = lazy.l10n.formatValueSync("error-erroneous-nickname", {
|
||||
name: this._requestedNickname,
|
||||
});
|
||||
serverErrorMessage(this, aMessage, msg);
|
||||
if (this._requestedNickname == this._accountNickname) {
|
||||
// The account has been set up with an illegal nickname.
|
||||
|
@ -1520,7 +1566,7 @@ export var ircBase = {
|
|||
return conversationErrorMessage(
|
||||
this,
|
||||
aMessage,
|
||||
"error.unavailable",
|
||||
"error-unavailable",
|
||||
true
|
||||
);
|
||||
},
|
||||
|
@ -1545,11 +1591,10 @@ export var ircBase = {
|
|||
// <user> <channel> :is already on channel
|
||||
this.getConversation(aMessage.params[2]).writeMessage(
|
||||
aMessage.origin,
|
||||
lazy._(
|
||||
"message.alreadyInChannel",
|
||||
aMessage.params[1],
|
||||
aMessage.params[2]
|
||||
),
|
||||
lazy.l10n.formatValueSync("message-already-in-channel", {
|
||||
nick: aMessage.params[1],
|
||||
conversationName: aMessage.params[2],
|
||||
}),
|
||||
{ system: true }
|
||||
);
|
||||
return true;
|
||||
|
@ -1592,7 +1637,9 @@ export var ircBase = {
|
|||
this.ERROR("Erroneous username: " + this.username);
|
||||
this.gotDisconnected(
|
||||
Ci.prplIAccount.ERROR_INVALID_USERNAME,
|
||||
lazy._("connection.error.invalidUsername", this.user)
|
||||
lazy.l10n.formatValueSync("connection-error-invalid-username", {
|
||||
username: this.user,
|
||||
})
|
||||
);
|
||||
return true;
|
||||
}
|
||||
|
@ -1616,23 +1663,31 @@ export var ircBase = {
|
|||
// :Password incorrect
|
||||
this.gotDisconnected(
|
||||
Ci.prplIAccount.ERROR_AUTHENTICATION_FAILED,
|
||||
lazy._("connection.error.invalidPassword")
|
||||
lazy.l10n.formatValueSync("connection-error-invalid-password")
|
||||
);
|
||||
return true;
|
||||
},
|
||||
465(aMessage) {
|
||||
// ERR_YOUREBANEDCREEP
|
||||
// :You are banned from this server
|
||||
serverErrorMessage(this, aMessage, lazy._("error.banned"));
|
||||
serverErrorMessage(
|
||||
this,
|
||||
aMessage,
|
||||
lazy.l10n.formatValueSync("error-banned")
|
||||
);
|
||||
this.gotDisconnected(
|
||||
Ci.prplIAccount.ERROR_OTHER_ERROR,
|
||||
lazy._("error.banned")
|
||||
lazy.l10n.formatValueSync("error-banned")
|
||||
); // Notify account manager.
|
||||
return true;
|
||||
},
|
||||
466(aMessage) {
|
||||
// ERR_YOUWILLBEBANNED
|
||||
return serverErrorMessage(this, aMessage, lazy._("error.bannedSoon"));
|
||||
return serverErrorMessage(
|
||||
this,
|
||||
aMessage,
|
||||
lazy.l10n.formatValueSync("error-banned-soon")
|
||||
);
|
||||
},
|
||||
467() {
|
||||
// ERR_KEYSET
|
||||
|
@ -1646,7 +1701,7 @@ export var ircBase = {
|
|||
return conversationErrorMessage(
|
||||
this,
|
||||
aMessage,
|
||||
"error.channelFull",
|
||||
"error-channel-full",
|
||||
true
|
||||
);
|
||||
},
|
||||
|
@ -1662,7 +1717,7 @@ export var ircBase = {
|
|||
return conversationErrorMessage(
|
||||
this,
|
||||
aMessage,
|
||||
"error.inviteOnly",
|
||||
"error-invite-only",
|
||||
true,
|
||||
false
|
||||
);
|
||||
|
@ -1673,7 +1728,7 @@ export var ircBase = {
|
|||
return conversationErrorMessage(
|
||||
this,
|
||||
aMessage,
|
||||
"error.channelBanned",
|
||||
"error-channel-banned",
|
||||
true,
|
||||
false
|
||||
);
|
||||
|
@ -1684,7 +1739,7 @@ export var ircBase = {
|
|||
return conversationErrorMessage(
|
||||
this,
|
||||
aMessage,
|
||||
"error.wrongKey",
|
||||
"error-wrong-key",
|
||||
true,
|
||||
false
|
||||
);
|
||||
|
@ -1716,7 +1771,7 @@ export var ircBase = {
|
|||
482(aMessage) {
|
||||
// ERR_CHANOPRIVSNEEDED
|
||||
// <channel> :You're not channel operator
|
||||
return conversationErrorMessage(this, aMessage, "error.notChannelOp");
|
||||
return conversationErrorMessage(this, aMessage, "error-not-channel-op");
|
||||
},
|
||||
483() {
|
||||
// ERR_CANTKILLSERVER
|
||||
|
@ -1755,13 +1810,19 @@ export var ircBase = {
|
|||
return serverErrorMessage(
|
||||
this,
|
||||
aMessage,
|
||||
lazy._("error.unknownMode", aMessage.params[1])
|
||||
lazy.l10n.formatValueSync("error-unknown-mode", {
|
||||
mode: aMessage.params[1],
|
||||
})
|
||||
);
|
||||
},
|
||||
502(aMessage) {
|
||||
// ERR_USERSDONTMATCH
|
||||
// :Cannot change mode for other users
|
||||
return serverErrorMessage(this, aMessage, lazy._("error.mode.wrongUser"));
|
||||
return serverErrorMessage(
|
||||
this,
|
||||
aMessage,
|
||||
lazy.l10n.formatValueSync("error-mode-wrong-user")
|
||||
);
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
@ -7,13 +7,14 @@
|
|||
* REVISED AND UPDATED CTCP SPECIFICATION
|
||||
* http://www.alien.net.au/irc/ctcp.txt
|
||||
*/
|
||||
import { l10nHelper } from "resource:///modules/imXPCOMUtils.sys.mjs";
|
||||
import { ircHandlerPriorities } from "resource:///modules/ircHandlerPriorities.sys.mjs";
|
||||
import { displayMessage } from "resource:///modules/ircUtils.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
ChromeUtils.defineLazyGetter(lazy, "_", () =>
|
||||
l10nHelper("chrome://chat/locale/irc.properties")
|
||||
ChromeUtils.defineLazyGetter(
|
||||
lazy,
|
||||
"l10n",
|
||||
() => new Localization(["chat/irc.ftl"], true)
|
||||
);
|
||||
|
||||
// Split into a CTCP message which is a single command and a single parameter:
|
||||
|
@ -239,7 +240,10 @@ export var ctcpBase = {
|
|||
const time = aMessage.ctcp.param.slice(aMessage.ctcp.param[0] == ":");
|
||||
this.getConversation(aMessage.origin).writeMessage(
|
||||
aMessage.origin,
|
||||
lazy._("ctcp.time", aMessage.origin, time),
|
||||
lazy.l10n.formatValueSync("ctcp-time", {
|
||||
username: aMessage.origin,
|
||||
timeResponse: time,
|
||||
}),
|
||||
{ system: true, tags: aMessage.tags }
|
||||
);
|
||||
}
|
||||
|
@ -269,11 +273,10 @@ export var ctcpBase = {
|
|||
} else if (aMessage.command == "NOTICE" && aMessage.ctcp.param.length) {
|
||||
// VERSION #:#:#
|
||||
// Received VERSION response, display to the user.
|
||||
const response = lazy._(
|
||||
"ctcp.version",
|
||||
aMessage.origin,
|
||||
aMessage.ctcp.param
|
||||
);
|
||||
const response = lazy.l10n.formatValueSync("ctcp-version", {
|
||||
username: aMessage.origin,
|
||||
version: aMessage.ctcp.param,
|
||||
});
|
||||
this.getConversation(aMessage.origin).writeMessage(
|
||||
aMessage.origin,
|
||||
response,
|
||||
|
|
|
@ -4,12 +4,13 @@
|
|||
|
||||
// This is to be exported directly onto the IRC prplIProtocol object, directly
|
||||
// implementing the commands field before we register them.
|
||||
import { l10nHelper } from "resource:///modules/imXPCOMUtils.sys.mjs";
|
||||
import { IMServices } from "resource:///modules/IMServices.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
ChromeUtils.defineLazyGetter(lazy, "_", () =>
|
||||
l10nHelper("chrome://chat/locale/irc.properties")
|
||||
ChromeUtils.defineLazyGetter(
|
||||
lazy,
|
||||
"l10n",
|
||||
() => new Localization(["chat/irc.ftl"], true)
|
||||
);
|
||||
|
||||
// Shortcut to get the JavaScript conversation object.
|
||||
|
@ -147,14 +148,16 @@ export var commands = [
|
|||
{
|
||||
name: "action",
|
||||
get helpString() {
|
||||
return lazy._("command.action", "action");
|
||||
return lazy.l10n.formatValueSync("command-action", {
|
||||
commandName: "action",
|
||||
});
|
||||
},
|
||||
run: actionCommand,
|
||||
},
|
||||
{
|
||||
name: "ban",
|
||||
get helpString() {
|
||||
return lazy._("command.ban", "ban");
|
||||
return lazy.l10n.formatValueSync("command-ban", { commandName: "ban" });
|
||||
},
|
||||
usageContext: IMServices.cmd.COMMAND_CONTEXT.CHAT,
|
||||
run: (aMsg, aConv) => setMode(aMsg, aConv, "b", true),
|
||||
|
@ -162,7 +165,7 @@ export var commands = [
|
|||
{
|
||||
name: "ctcp",
|
||||
get helpString() {
|
||||
return lazy._("command.ctcp", "ctcp");
|
||||
return lazy.l10n.formatValueSync("command-ctcp", { commandName: "ctcp" });
|
||||
},
|
||||
run(aMsg, aConv) {
|
||||
const separator = aMsg.indexOf(" ");
|
||||
|
@ -180,14 +183,16 @@ export var commands = [
|
|||
{
|
||||
name: "chanserv",
|
||||
get helpString() {
|
||||
return lazy._("command.chanserv", "chanserv");
|
||||
return lazy.l10n.formatValueSync("command-chanserv", {
|
||||
commandName: "chanserv",
|
||||
});
|
||||
},
|
||||
run: (aMsg, aConv) => privateMessage(aConv, aMsg, "ChanServ"),
|
||||
},
|
||||
{
|
||||
name: "deop",
|
||||
get helpString() {
|
||||
return lazy._("command.deop", "deop");
|
||||
return lazy.l10n.formatValueSync("command-deop", { commandName: "deop" });
|
||||
},
|
||||
usageContext: IMServices.cmd.COMMAND_CONTEXT.CHAT,
|
||||
run: (aMsg, aConv) => setMode(aMsg, aConv, "o", false),
|
||||
|
@ -195,7 +200,9 @@ export var commands = [
|
|||
{
|
||||
name: "devoice",
|
||||
get helpString() {
|
||||
return lazy._("command.devoice", "devoice");
|
||||
return lazy.l10n.formatValueSync("command-devoice", {
|
||||
commandName: "devoice",
|
||||
});
|
||||
},
|
||||
usageContext: IMServices.cmd.COMMAND_CONTEXT.CHAT,
|
||||
run: (aMsg, aConv) => setMode(aMsg, aConv, "v", false),
|
||||
|
@ -203,7 +210,9 @@ export var commands = [
|
|||
{
|
||||
name: "invite",
|
||||
get helpString() {
|
||||
return lazy._("command.invite2", "invite");
|
||||
return lazy.l10n.formatValueSync("command-invite2", {
|
||||
commandName: "invite",
|
||||
});
|
||||
},
|
||||
run(aMsg, aConv) {
|
||||
const params = splitInput(aMsg);
|
||||
|
@ -241,7 +250,7 @@ export var commands = [
|
|||
{
|
||||
name: "join",
|
||||
get helpString() {
|
||||
return lazy._("command.join", "join");
|
||||
return lazy.l10n.formatValueSync("command-join", { commandName: "join" });
|
||||
},
|
||||
run(aMsg, aConv, aReturnedConv) {
|
||||
let params = aMsg.trim().split(/,\s*/);
|
||||
|
@ -277,7 +286,7 @@ export var commands = [
|
|||
{
|
||||
name: "kick",
|
||||
get helpString() {
|
||||
return lazy._("command.kick", "kick");
|
||||
return lazy.l10n.formatValueSync("command-kick", { commandName: "kick" });
|
||||
},
|
||||
usageContext: IMServices.cmd.COMMAND_CONTEXT.CHAT,
|
||||
run: kickCommand,
|
||||
|
@ -285,7 +294,7 @@ export var commands = [
|
|||
{
|
||||
name: "list",
|
||||
get helpString() {
|
||||
return lazy._("command.list", "list");
|
||||
return lazy.l10n.formatValueSync("command-list", { commandName: "list" });
|
||||
},
|
||||
run(aMsg, aConv, aReturnedConv) {
|
||||
const account = getAccount(aConv);
|
||||
|
@ -338,14 +347,16 @@ export var commands = [
|
|||
{
|
||||
name: "me",
|
||||
get helpString() {
|
||||
return lazy._("command.action", "me");
|
||||
return lazy.l10n.formatValueSync("command-action", { commandName: "me" });
|
||||
},
|
||||
run: actionCommand,
|
||||
},
|
||||
{
|
||||
name: "memoserv",
|
||||
get helpString() {
|
||||
return lazy._("command.memoserv", "memoserv");
|
||||
return lazy.l10n.formatValueSync("command-memoserv", {
|
||||
commandName: "memoserv",
|
||||
});
|
||||
},
|
||||
run: (aMsg, aConv) => privateMessage(aConv, aMsg, "MemoServ"),
|
||||
},
|
||||
|
@ -353,9 +364,13 @@ export var commands = [
|
|||
name: "mode",
|
||||
get helpString() {
|
||||
return (
|
||||
lazy._("command.modeUser2", "mode") +
|
||||
lazy.l10n.formatValueSync("command-mode-user2", {
|
||||
commandName: "mode",
|
||||
}) +
|
||||
"\n" +
|
||||
lazy._("command.modeChannel2", "mode")
|
||||
lazy.l10n.formatValueSync("command-mode-channel2", {
|
||||
commandName: "mode",
|
||||
})
|
||||
);
|
||||
},
|
||||
run(aMsg, aConv) {
|
||||
|
@ -384,14 +399,14 @@ export var commands = [
|
|||
{
|
||||
name: "msg",
|
||||
get helpString() {
|
||||
return lazy._("command.msg", "msg");
|
||||
return lazy.l10n.formatValueSync("command-msg", { commandName: "msg" });
|
||||
},
|
||||
run: messageCommand,
|
||||
},
|
||||
{
|
||||
name: "nick",
|
||||
get helpString() {
|
||||
return lazy._("command.nick", "nick");
|
||||
return lazy.l10n.formatValueSync("command-nick", { commandName: "nick" });
|
||||
},
|
||||
run(aMsg, aConv) {
|
||||
const newNick = aMsg.trim();
|
||||
|
@ -412,14 +427,16 @@ export var commands = [
|
|||
{
|
||||
name: "nickserv",
|
||||
get helpString() {
|
||||
return lazy._("command.nickserv", "nickserv");
|
||||
return lazy.l10n.formatValueSync("command-nickserv", {
|
||||
commandName: "nickserv",
|
||||
});
|
||||
},
|
||||
run: (aMsg, aConv) => privateMessage(aConv, aMsg, "NickServ"),
|
||||
},
|
||||
{
|
||||
name: "notice",
|
||||
get helpString() {
|
||||
return lazy._("command.notice", "notice");
|
||||
return lazy.l10n.formatValueSync("command-notice", "notice");
|
||||
},
|
||||
run: (aMsg, aConv, aReturnedConv) =>
|
||||
messageCommand(aMsg, aConv, aReturnedConv, true),
|
||||
|
@ -427,7 +444,7 @@ export var commands = [
|
|||
{
|
||||
name: "op",
|
||||
get helpString() {
|
||||
return lazy._("command.op", "op");
|
||||
return lazy.l10n.formatValueSync("command-op", "op");
|
||||
},
|
||||
usageContext: IMServices.cmd.COMMAND_CONTEXT.CHAT,
|
||||
run: (aMsg, aConv) => setMode(aMsg, aConv, "o", true),
|
||||
|
@ -435,14 +452,16 @@ export var commands = [
|
|||
{
|
||||
name: "operserv",
|
||||
get helpString() {
|
||||
return lazy._("command.operserv", "operserv");
|
||||
return lazy.l10n.formatValueSync("command-operserv", {
|
||||
commandName: "operserv",
|
||||
});
|
||||
},
|
||||
run: (aMsg, aConv) => privateMessage(aConv, aMsg, "OperServ"),
|
||||
},
|
||||
{
|
||||
name: "part",
|
||||
get helpString() {
|
||||
return lazy._("command.part", "part");
|
||||
return lazy.l10n.formatValueSync("command-part", "part");
|
||||
},
|
||||
usageContext: IMServices.cmd.COMMAND_CONTEXT.CHAT,
|
||||
run(aMsg, aConv) {
|
||||
|
@ -453,7 +472,7 @@ export var commands = [
|
|||
{
|
||||
name: "ping",
|
||||
get helpString() {
|
||||
return lazy._("command.ping", "ping");
|
||||
return lazy.l10n.formatValueSync("command-ping", { commandName: "ping" });
|
||||
},
|
||||
run(aMsg, aConv) {
|
||||
// Send a ping to the entered nick using the current time (in
|
||||
|
@ -471,14 +490,14 @@ export var commands = [
|
|||
{
|
||||
name: "query",
|
||||
get helpString() {
|
||||
return lazy._("command.msg", "query");
|
||||
return lazy.l10n.formatValueSync("command-msg", { commandName: "query" });
|
||||
},
|
||||
run: messageCommand,
|
||||
},
|
||||
{
|
||||
name: "quit",
|
||||
get helpString() {
|
||||
return lazy._("command.quit", "quit");
|
||||
return lazy.l10n.formatValueSync("command-quit", { commandName: "quit" });
|
||||
},
|
||||
run(aMsg, aConv) {
|
||||
const account = getAccount(aConv);
|
||||
|
@ -493,7 +512,9 @@ export var commands = [
|
|||
{
|
||||
name: "quote",
|
||||
get helpString() {
|
||||
return lazy._("command.quote", "quote");
|
||||
return lazy.l10n.formatValueSync("command-quote", {
|
||||
commandName: "quote",
|
||||
});
|
||||
},
|
||||
run(aMsg, aConv) {
|
||||
if (!aMsg.length) {
|
||||
|
@ -507,7 +528,9 @@ export var commands = [
|
|||
{
|
||||
name: "remove",
|
||||
get helpString() {
|
||||
return lazy._("command.kick", "remove");
|
||||
return lazy.l10n.formatValueSync("command-kick", {
|
||||
commandName: "remove",
|
||||
});
|
||||
},
|
||||
usageContext: IMServices.cmd.COMMAND_CONTEXT.CHAT,
|
||||
run: kickCommand,
|
||||
|
@ -515,7 +538,7 @@ export var commands = [
|
|||
{
|
||||
name: "time",
|
||||
get helpString() {
|
||||
return lazy._("command.time", "time");
|
||||
return lazy.l10n.formatValueSync("command-time", { commandName: "time" });
|
||||
},
|
||||
run(aMsg, aConv) {
|
||||
// Send a time command to the entered nick using the current time (in
|
||||
|
@ -533,7 +556,9 @@ export var commands = [
|
|||
{
|
||||
name: "topic",
|
||||
get helpString() {
|
||||
return lazy._("command.topic", "topic");
|
||||
return lazy.l10n.formatValueSync("command-topic", {
|
||||
commandName: "topic",
|
||||
});
|
||||
},
|
||||
usageContext: IMServices.cmd.COMMAND_CONTEXT.CHAT,
|
||||
run(aMsg, aConv) {
|
||||
|
@ -544,7 +569,9 @@ export var commands = [
|
|||
{
|
||||
name: "umode",
|
||||
get helpString() {
|
||||
return lazy._("command.umode", "umode");
|
||||
return lazy.l10n.formatValueSync("command-umode", {
|
||||
commandName: "umode",
|
||||
});
|
||||
},
|
||||
run(aMsg, aConv) {
|
||||
const params = aMsg ? splitInput(aMsg) : [];
|
||||
|
@ -555,7 +582,9 @@ export var commands = [
|
|||
{
|
||||
name: "version",
|
||||
get helpString() {
|
||||
return lazy._("command.version", "version");
|
||||
return lazy.l10n.formatValueSync("command-version", {
|
||||
commandName: "version",
|
||||
});
|
||||
},
|
||||
run(aMsg, aConv) {
|
||||
if (!aMsg || !aMsg.trim().length) {
|
||||
|
@ -568,7 +597,9 @@ export var commands = [
|
|||
{
|
||||
name: "voice",
|
||||
get helpString() {
|
||||
return lazy._("command.voice", "voice");
|
||||
return lazy.l10n.formatValueSync("command-voice", {
|
||||
commandName: "voice",
|
||||
});
|
||||
},
|
||||
usageContext: IMServices.cmd.COMMAND_CONTEXT.CHAT,
|
||||
run: (aMsg, aConv) => setMode(aMsg, aConv, "v", true),
|
||||
|
@ -576,7 +607,9 @@ export var commands = [
|
|||
{
|
||||
name: "whois",
|
||||
get helpString() {
|
||||
return lazy._("command.whois2", "whois");
|
||||
return lazy.l10n.formatValueSync("command-whois2", {
|
||||
commandName: "whois",
|
||||
});
|
||||
},
|
||||
run(aMsg, aConv) {
|
||||
// Note that this will automatically run whowas if the nick is offline.
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
* https://github.com/atheme/charybdis/blob/master/include/numeric.h
|
||||
* https://github.com/unrealircd/unrealircd/blob/unreal42/include/numeric.h
|
||||
*/
|
||||
import { l10nHelper } from "resource:///modules/imXPCOMUtils.sys.mjs";
|
||||
import { ircHandlerPriorities } from "resource:///modules/ircHandlerPriorities.sys.mjs";
|
||||
import {
|
||||
conversationErrorMessage,
|
||||
|
@ -20,8 +19,10 @@ import {
|
|||
} from "resource:///modules/ircUtils.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
ChromeUtils.defineLazyGetter(lazy, "_", () =>
|
||||
l10nHelper("chrome://chat/locale/irc.properties")
|
||||
ChromeUtils.defineLazyGetter(
|
||||
lazy,
|
||||
"l10n",
|
||||
() => new Localization(["chat/irc.ftl"], true)
|
||||
);
|
||||
|
||||
export var ircNonStandard = {
|
||||
|
@ -75,7 +76,7 @@ export var ircNonStandard = {
|
|||
// Otherwise, put the account in an error state.
|
||||
this.gotDisconnected(
|
||||
Ci.prplIAccount.ERROR_AUTHENTICATION_IMPOSSIBLE,
|
||||
lazy._("connection.error.passwordRequired")
|
||||
lazy.l10n.formatValueSync("connection-error-password-required")
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -227,7 +228,7 @@ export var ircNonStandard = {
|
|||
return conversationErrorMessage(
|
||||
this,
|
||||
aMessage,
|
||||
"error.channelForward",
|
||||
"error-channel-forward",
|
||||
true,
|
||||
false
|
||||
);
|
||||
|
@ -236,7 +237,11 @@ export var ircNonStandard = {
|
|||
499(aMessage) {
|
||||
// ERR_CHANOWNPRIVNEEDED (Unreal)
|
||||
// <channel> :You're not the channel owner (status +q is needed)
|
||||
return conversationErrorMessage(this, aMessage, "error.notChannelOwner");
|
||||
return conversationErrorMessage(
|
||||
this,
|
||||
aMessage,
|
||||
"error-not-channel-owner"
|
||||
);
|
||||
},
|
||||
|
||||
671(aMessage) {
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import { l10nHelper } from "resource:///modules/imXPCOMUtils.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
ChromeUtils.defineLazyGetter(lazy, "_", () =>
|
||||
l10nHelper("chrome://chat/locale/irc.properties")
|
||||
ChromeUtils.defineLazyGetter(
|
||||
lazy,
|
||||
"l10n",
|
||||
() => new Localization(["chat/irc.ftl"], true)
|
||||
);
|
||||
|
||||
ChromeUtils.defineLazyGetter(lazy, "TXTToHTML", function () {
|
||||
|
@ -239,7 +239,10 @@ export function conversationErrorMessage(
|
|||
const conv = aAccount.getConversation(aMessage.params[1]);
|
||||
conv.writeMessage(
|
||||
aMessage.origin,
|
||||
lazy._(aError, aMessage.params[1], aMessage.params[2] || undefined),
|
||||
lazy.l10n.formatValueSync(aError, {
|
||||
name: aMessage.params[1],
|
||||
details: aMessage.params[2],
|
||||
}),
|
||||
{
|
||||
error: true,
|
||||
system: true,
|
||||
|
|
|
@ -2,13 +2,14 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import { l10nHelper } from "resource:///modules/imXPCOMUtils.sys.mjs";
|
||||
import { GenericProtocolPrototype } from "resource:///modules/jsProtoHelper.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineLazyGetter(lazy, "_", () =>
|
||||
l10nHelper("chrome://chat/locale/matrix.properties")
|
||||
ChromeUtils.defineLazyGetter(
|
||||
lazy,
|
||||
"l10n",
|
||||
() => new Localization(["chat/matrix-properties.ftl"], true)
|
||||
);
|
||||
|
||||
ChromeUtils.defineLazyGetter(lazy, "brandShortName", () =>
|
||||
|
@ -43,13 +44,13 @@ MatrixProtocol.prototype = {
|
|||
},
|
||||
|
||||
get usernameEmptyText() {
|
||||
return lazy._("matrix.usernameHint");
|
||||
return lazy.l10n.formatValueSync("matrix-username-hint");
|
||||
},
|
||||
usernamePrefix: "@",
|
||||
usernameSplits: [
|
||||
{
|
||||
get label() {
|
||||
return lazy._("options.homeserver");
|
||||
return lazy.l10n.formatValueSync("options-homeserver");
|
||||
},
|
||||
separator: ":",
|
||||
},
|
||||
|
@ -58,13 +59,13 @@ MatrixProtocol.prototype = {
|
|||
options: {
|
||||
saveToken: {
|
||||
get label() {
|
||||
return lazy._("options.saveToken");
|
||||
return lazy.l10n.formatValueSync("options-save-token");
|
||||
},
|
||||
default: true,
|
||||
},
|
||||
deviceDisplayName: {
|
||||
get label() {
|
||||
return lazy._("options.deviceDisplayName");
|
||||
return lazy.l10n.formatValueSync("options-device-display-name");
|
||||
},
|
||||
get default() {
|
||||
return lazy.brandShortName;
|
||||
|
@ -72,7 +73,7 @@ MatrixProtocol.prototype = {
|
|||
},
|
||||
backupPassphrase: {
|
||||
get label() {
|
||||
return lazy._("options.backupPassphrase");
|
||||
return lazy.l10n.formatValueSync("options-backup-passphrase");
|
||||
},
|
||||
default: "",
|
||||
masked: true,
|
||||
|
|
|
@ -3,10 +3,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import { clearTimeout, setTimeout } from "resource://gre/modules/Timer.sys.mjs";
|
||||
import {
|
||||
nsSimpleEnumerator,
|
||||
l10nHelper,
|
||||
} from "resource:///modules/imXPCOMUtils.sys.mjs";
|
||||
import { nsSimpleEnumerator } from "resource:///modules/imXPCOMUtils.sys.mjs";
|
||||
import { IMServices } from "resource:///modules/IMServices.sys.mjs";
|
||||
import {
|
||||
GenericAccountPrototype,
|
||||
|
@ -22,14 +19,11 @@ import {
|
|||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineLazyGetter(lazy, "_", () =>
|
||||
l10nHelper("chrome://chat/locale/matrix.properties")
|
||||
);
|
||||
|
||||
ChromeUtils.defineLazyGetter(
|
||||
lazy,
|
||||
"l10n",
|
||||
() => new Localization(["chat/matrix.ftl"], true)
|
||||
() =>
|
||||
new Localization(["chat/matrix.ftl", "chat/matrix-properties.ftl"], true)
|
||||
);
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
|
@ -146,7 +140,7 @@ MatrixMessage.prototype = {
|
|||
const actions = [];
|
||||
if (this.event?.isDecryptionFailure()) {
|
||||
actions.push({
|
||||
label: lazy._("message.action.requestKey"),
|
||||
label: lazy.l10n.formatValueSync("message-action-request-key"),
|
||||
run: () => {
|
||||
if (this.event) {
|
||||
this.conversation?._account?._client
|
||||
|
@ -164,7 +158,7 @@ MatrixMessage.prototype = {
|
|||
)
|
||||
) {
|
||||
actions.push({
|
||||
label: lazy._("message.action.redact"),
|
||||
label: lazy.l10n.formatValueSync("message-action-redact"),
|
||||
run: () => {
|
||||
this.conversation?._account?._client
|
||||
?.redactEvent(
|
||||
|
@ -178,7 +172,7 @@ MatrixMessage.prototype = {
|
|||
}
|
||||
if (this.incoming && this.event) {
|
||||
actions.push({
|
||||
label: lazy._("message.action.report"),
|
||||
label: lazy.l10n.formatValueSync("message-action-report"),
|
||||
run: () => {
|
||||
this.conversation?._account?._client
|
||||
?.reportEvent(this.event.getRoomId(), this.event.getId(), -100, "")
|
||||
|
@ -188,7 +182,7 @@ MatrixMessage.prototype = {
|
|||
}
|
||||
if (this.event?.status === lazy.MatrixSDK.EventStatus.NOT_SENT) {
|
||||
actions.push({
|
||||
label: lazy._("message.action.retry"),
|
||||
label: lazy.l10n.formatValueSync("message-action-retry"),
|
||||
run: () => {
|
||||
this.conversation?._account?._client?.resendEvent(
|
||||
this.event,
|
||||
|
@ -205,7 +199,7 @@ MatrixMessage.prototype = {
|
|||
].includes(this.event?.status)
|
||||
) {
|
||||
actions.push({
|
||||
label: lazy._("message.action.cancel"),
|
||||
label: lazy.l10n.formatValueSync("message-action-cancel"),
|
||||
run: () => {
|
||||
this.conversation?._account?._client?.cancelPendingEvent(this.event);
|
||||
},
|
||||
|
@ -613,7 +607,7 @@ MatrixRoom.prototype = {
|
|||
if (room.isSpaceRoom()) {
|
||||
this.writeMessage(
|
||||
this._account.userId,
|
||||
lazy._("message.spaceNotSupported"),
|
||||
lazy.l10n.formatValueSync("message-space-not-supported"),
|
||||
{
|
||||
system: true,
|
||||
incoming: true,
|
||||
|
@ -1481,7 +1475,10 @@ function MatrixSession(account, ownerId, deviceInfo) {
|
|||
this._ownerId = ownerId;
|
||||
let id = deviceInfo.deviceId;
|
||||
if (deviceInfo.getDisplayName()) {
|
||||
id = lazy._("options.encryption.session", id, deviceInfo.getDisplayName());
|
||||
id = lazy.l10n.formatValueSync("options-encryption-session", {
|
||||
sessionId: id,
|
||||
sessionDisplayName: deviceInfo.getDisplayName(),
|
||||
});
|
||||
}
|
||||
const deviceTrust = account._client.checkDeviceTrust(
|
||||
ownerId,
|
||||
|
@ -1525,8 +1522,8 @@ MatrixSession.prototype = {
|
|||
|
||||
function getStatusString(status) {
|
||||
return status
|
||||
? lazy._("options.encryption.statusOk")
|
||||
: lazy._("options.encryption.statusNotOk");
|
||||
? lazy.l10n.formatValueSync("options-encryption-status-ok")
|
||||
: lazy.l10n.formatValueSync("options-encryption-status-not-ok");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1751,7 +1748,7 @@ MatrixAccount.prototype = {
|
|||
} else {
|
||||
this.reportDisconnecting(
|
||||
Ci.prplIAccount.ERROR_AUTHENTICATION_IMPOSSIBLE,
|
||||
lazy._("connection.error.noSupportedFlow")
|
||||
lazy.l10n.formatValueSync("connection-error-no-supported-flow")
|
||||
);
|
||||
this.reportDisconnected();
|
||||
}
|
||||
|
@ -1795,7 +1792,9 @@ MatrixAccount.prototype = {
|
|||
homeserverResult = discoveredInfo[HOMESERVER_WELL_KNOWN];
|
||||
}
|
||||
if (homeserverResult.state === lazy.MatrixSDK.AutoDiscovery.PROMPT) {
|
||||
throw new Error(lazy._("connection.error.serverNotFound"));
|
||||
throw new Error(
|
||||
lazy.l10n.formatValueSync("connection-error-server-not-found")
|
||||
);
|
||||
}
|
||||
if (homeserverResult.state !== lazy.MatrixSDK.AutoDiscovery.SUCCESS) {
|
||||
//TODO these are English strings generated by the SDK.
|
||||
|
@ -1851,8 +1850,8 @@ MatrixAccount.prototype = {
|
|||
const backupPassphrase = this.getString("backupPassphrase");
|
||||
if (!backupPassphrase) {
|
||||
this.WARN("Missing secret storage key");
|
||||
this._encryptionError = lazy._(
|
||||
"options.encryption.needBackupPassphrase"
|
||||
this._encryptionError = lazy.l10n.formatValueSync(
|
||||
"options-encryption-need-backup-passphrase"
|
||||
);
|
||||
await this.updateEncryptionStatus();
|
||||
return null;
|
||||
|
@ -1943,7 +1942,7 @@ MatrixAccount.prototype = {
|
|||
* Show SSO prompt and handle response token.
|
||||
*/
|
||||
requestAuthorization() {
|
||||
this.reportConnecting(lazy._("connection.requestAuth"));
|
||||
this.reportConnecting(lazy.l10n.formatValueSync("connection-request-auth"));
|
||||
const url = this._client.getSsoLoginUrl(
|
||||
lazy.InteractiveBrowser.COMPLETION_URL,
|
||||
"sso"
|
||||
|
@ -1960,13 +1959,15 @@ MatrixAccount.prototype = {
|
|||
throw new Error("No token in redirect");
|
||||
}
|
||||
|
||||
this.reportConnecting(lazy._("connection.requestAccess"));
|
||||
this.reportConnecting(
|
||||
lazy.l10n.formatValueSync("connection-request-access")
|
||||
);
|
||||
this.loginWithToken(urlData.get("loginToken"));
|
||||
})
|
||||
.catch(() => {
|
||||
this.reportDisconnecting(
|
||||
Ci.prplIAccount.ERROR_AUTHENTICATION_FAILED,
|
||||
lazy._("connection.error.authCancelled")
|
||||
lazy.l10n.formatValueSync("connection-error-auth-cancelled")
|
||||
);
|
||||
this.reportDisconnected();
|
||||
});
|
||||
|
@ -2164,7 +2165,9 @@ MatrixAccount.prototype = {
|
|||
this._failedEvents.add(event.getId());
|
||||
conv.writeMessage(
|
||||
this._roomId,
|
||||
lazy._("error.sendMessageFailed", event.getContent().body),
|
||||
lazy.l10n.formatValueSync("error-send-message-failed", {
|
||||
message: event.getContent().body,
|
||||
}),
|
||||
{
|
||||
error: true,
|
||||
system: true,
|
||||
|
@ -2300,7 +2303,7 @@ MatrixAccount.prototype = {
|
|||
// TODO handle soft logout with an auto reconnect
|
||||
this.reportDisconnecting(
|
||||
Ci.prplIAccount.ERROR_OTHER_ERROR,
|
||||
lazy._("connection.error.sessionEnded")
|
||||
lazy.l10n.formatValueSync("connection-error-session-ended")
|
||||
);
|
||||
this.reportDisconnected();
|
||||
});
|
||||
|
@ -2488,26 +2491,31 @@ MatrixAccount.prototype = {
|
|||
const crossSigningReady = await this._client.isCrossSigningReady();
|
||||
const keyBackupReady = this._client.getKeyBackupEnabled();
|
||||
const statuses = [
|
||||
lazy._(
|
||||
"options.encryption.enabled",
|
||||
getStatusString(this._client.isCryptoEnabled())
|
||||
),
|
||||
lazy._(
|
||||
"options.encryption.secretStorage",
|
||||
getStatusString(secretStorageReady)
|
||||
),
|
||||
lazy._("options.encryption.keyBackup", getStatusString(keyBackupReady)),
|
||||
lazy._(
|
||||
"options.encryption.crossSigning",
|
||||
getStatusString(crossSigningReady)
|
||||
),
|
||||
lazy.l10n.formatValueSync("options-encryption-enabled", {
|
||||
status: getStatusString(this._client.isCryptoEnabled()),
|
||||
}),
|
||||
lazy.l10n.formatValueSync("options-encryption-secret-storage", {
|
||||
status: getStatusString(secretStorageReady),
|
||||
}),
|
||||
lazy.l10n.formatValueSync("options-encryption-key-backup", {
|
||||
status: getStatusString(keyBackupReady),
|
||||
}),
|
||||
lazy.l10n.formatValueSync("options-encryption-cross-signing", {
|
||||
status: getStatusString(crossSigningReady),
|
||||
}),
|
||||
];
|
||||
if (this._encryptionError) {
|
||||
statuses.push(this._encryptionError);
|
||||
} else if (!secretStorageReady) {
|
||||
statuses.push(lazy._("options.encryption.setUpSecretStorage"));
|
||||
statuses.push(
|
||||
lazy.l10n.formatValueSync("options-encryption-set-up-secret-storage")
|
||||
);
|
||||
} else if (!keyBackupReady && !crossSigningReady) {
|
||||
statuses.push(lazy._("options.encryption.setUpBackupAndCrossSigning"));
|
||||
statuses.push(
|
||||
lazy.l10n.formatValueSync(
|
||||
"options-encryption-set-up-backup-and-cross-signing"
|
||||
)
|
||||
);
|
||||
}
|
||||
this.encryptionStatus = statuses;
|
||||
},
|
||||
|
@ -2614,11 +2622,10 @@ MatrixAccount.prototype = {
|
|||
request.targetDevice.deviceId
|
||||
);
|
||||
if (deviceInfo?.getDisplayName()) {
|
||||
displayName = lazy._(
|
||||
"options.encryption.session",
|
||||
request.targetDevice.deviceId,
|
||||
deviceInfo.getDisplayName()
|
||||
);
|
||||
displayName = lazy.l10n.formatValueSync("options-encryption-session", {
|
||||
sessionId: request.targetDevice.deviceId,
|
||||
sessionDisplayName: deviceInfo.getDisplayName(),
|
||||
});
|
||||
} else {
|
||||
displayName = request.targetDevice.deviceId;
|
||||
}
|
||||
|
@ -3113,7 +3120,7 @@ MatrixAccount.prototype = {
|
|||
// probably want to keep the type prefix
|
||||
roomIdOrAlias: {
|
||||
get label() {
|
||||
return lazy._("chatRoomField.room");
|
||||
return lazy.l10n.formatValueSync("chat-room-field-room");
|
||||
},
|
||||
required: true,
|
||||
},
|
||||
|
@ -3385,14 +3392,19 @@ MatrixAccount.prototype = {
|
|||
if (!valuesAndUnits[2]) {
|
||||
valuesAndUnits.splice(2, 2);
|
||||
}
|
||||
return lazy._("tooltip.timespan", valuesAndUnits.join(" "));
|
||||
return lazy.l10n.formatValueSync("tooltip-timespan", {
|
||||
timespan: valuesAndUnits.join(" "),
|
||||
});
|
||||
};
|
||||
|
||||
const tooltipInfo = [];
|
||||
|
||||
if (user.displayName) {
|
||||
tooltipInfo.push(
|
||||
new TooltipInfo(lazy._("tooltip.displayName"), user.displayName)
|
||||
new TooltipInfo(
|
||||
lazy.l10n.formatValueSync("tooltip-display-name"),
|
||||
user.displayName
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -3401,7 +3413,7 @@ MatrixAccount.prototype = {
|
|||
if (status === Ci.imIStatusInfo.STATUS_IDLE) {
|
||||
tooltipInfo.push(
|
||||
new TooltipInfo(
|
||||
lazy._("tooltip.lastActive"),
|
||||
lazy.l10n.formatValueSync("tooltip-last-active"),
|
||||
getNormalizedTime(user.lastActiveAgo)
|
||||
)
|
||||
);
|
||||
|
|
|
@ -2,13 +2,14 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import { l10nHelper } from "resource:///modules/imXPCOMUtils.sys.mjs";
|
||||
import { IMServices } from "resource:///modules/IMServices.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineLazyGetter(lazy, "_", () =>
|
||||
l10nHelper("chrome://chat/locale/matrix.properties")
|
||||
ChromeUtils.defineLazyGetter(
|
||||
lazy,
|
||||
"l10n",
|
||||
() => new Localization(["chat/matrix-properties.ftl"], true)
|
||||
);
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
|
@ -17,22 +18,22 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
|||
});
|
||||
|
||||
ChromeUtils.defineLazyGetter(lazy, "EVENT_TO_STRING", () => ({
|
||||
ban: "powerLevel.ban",
|
||||
[lazy.MatrixSDK.EventType.RoomAvatar]: "powerLevel.roomAvatar",
|
||||
[lazy.MatrixSDK.EventType.RoomCanonicalAlias]: "powerLevel.mainAddress",
|
||||
[lazy.MatrixSDK.EventType.RoomHistoryVisibility]: "powerLevel.history",
|
||||
[lazy.MatrixSDK.EventType.RoomName]: "powerLevel.roomName",
|
||||
[lazy.MatrixSDK.EventType.RoomPowerLevels]: "powerLevel.changePermissions",
|
||||
[lazy.MatrixSDK.EventType.RoomServerAcl]: "powerLevel.server_acl",
|
||||
[lazy.MatrixSDK.EventType.RoomTombstone]: "powerLevel.upgradeRoom",
|
||||
invite: "powerLevel.inviteUser",
|
||||
kick: "powerLevel.kickUsers",
|
||||
redact: "powerLevel.remove",
|
||||
state_default: "powerLevel.state_default",
|
||||
users_default: "powerLevel.defaultRole",
|
||||
events_default: "powerLevel.events_default",
|
||||
[lazy.MatrixSDK.EventType.RoomEncryption]: "powerLevel.encryption",
|
||||
[lazy.MatrixSDK.EventType.RoomTopic]: "powerLevel.topic",
|
||||
ban: "power-level-ban",
|
||||
[lazy.MatrixSDK.EventType.RoomAvatar]: "power-level-room-avatar",
|
||||
[lazy.MatrixSDK.EventType.RoomCanonicalAlias]: "power-level-main-address",
|
||||
[lazy.MatrixSDK.EventType.RoomHistoryVisibility]: "power-level-history",
|
||||
[lazy.MatrixSDK.EventType.RoomName]: "power-level-room-name",
|
||||
[lazy.MatrixSDK.EventType.RoomPowerLevels]: "power-level-change-permissions",
|
||||
[lazy.MatrixSDK.EventType.RoomServerAcl]: "power-level-server-acl",
|
||||
[lazy.MatrixSDK.EventType.RoomTombstone]: "power-level-upgrade-room",
|
||||
invite: "power-level-invite-user",
|
||||
kick: "power-level-kick-users",
|
||||
redact: "power-level-remove",
|
||||
state_default: "power-level-state-default",
|
||||
users_default: "power-level-default-role",
|
||||
events_default: "power-level-events-default",
|
||||
[lazy.MatrixSDK.EventType.RoomEncryption]: "power-level-encryption",
|
||||
[lazy.MatrixSDK.EventType.RoomTopic]: "power-level-topic",
|
||||
}));
|
||||
|
||||
// Commands from element that we're not yet supporting (including equivalents):
|
||||
|
@ -67,7 +68,9 @@ function getAccount(conv) {
|
|||
*/
|
||||
function getEventString(eventType, userPower) {
|
||||
if (lazy.EVENT_TO_STRING.hasOwnProperty(eventType)) {
|
||||
return lazy._(lazy.EVENT_TO_STRING[eventType], userPower);
|
||||
return lazy.l10n.formatValueSync(lazy.EVENT_TO_STRING[eventType], {
|
||||
var1: userPower,
|
||||
});
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
@ -88,19 +91,23 @@ function publishRoomDetails(account, conv) {
|
|||
const room = conv.room;
|
||||
|
||||
const name = room.name;
|
||||
const nameString = lazy._("detail.name", name);
|
||||
const nameString = lazy.l10n.formatValueSync("detail-name", { value: name });
|
||||
conv.writeMessage(account.userId, nameString, {
|
||||
system: true,
|
||||
});
|
||||
|
||||
const roomId = room.roomId;
|
||||
const roomIdString = lazy._("detail.roomId", roomId);
|
||||
const roomIdString = lazy.l10n.formatValueSync("detail-room-id", {
|
||||
value: roomId,
|
||||
});
|
||||
conv.writeMessage(account.userId, roomIdString, {
|
||||
system: true,
|
||||
});
|
||||
|
||||
const roomVersion = room.getVersion();
|
||||
const versionString = lazy._("detail.version", roomVersion);
|
||||
const versionString = lazy.l10n.formatValueSync("detail-version", {
|
||||
value: roomVersion,
|
||||
});
|
||||
conv.writeMessage(account.userId, versionString, {
|
||||
system: true,
|
||||
});
|
||||
|
@ -111,7 +118,9 @@ function publishRoomDetails(account, conv) {
|
|||
.getStateEvents(lazy.MatrixSDK.EventType.RoomTopic)[0]
|
||||
.getContent().topic;
|
||||
}
|
||||
const topicString = lazy._("detail.topic", topic);
|
||||
const topicString = lazy.l10n.formatValueSync("detail-topic", {
|
||||
value: topic,
|
||||
});
|
||||
conv.writeMessage(account.userId, topicString, {
|
||||
system: true,
|
||||
});
|
||||
|
@ -119,7 +128,9 @@ function publishRoomDetails(account, conv) {
|
|||
const guestAccess = roomState
|
||||
.getStateEvents(lazy.MatrixSDK.EventType.RoomGuestAccess, "")
|
||||
?.getContent()?.guest_access;
|
||||
const guestAccessString = lazy._("detail.guest", guestAccess);
|
||||
const guestAccessString = lazy.l10n.formatValueSync("detail-guest", {
|
||||
value: guestAccess,
|
||||
});
|
||||
conv.writeMessage(account.userId, guestAccessString, {
|
||||
system: true,
|
||||
});
|
||||
|
@ -137,14 +148,18 @@ function publishRoomDetails(account, conv) {
|
|||
}
|
||||
|
||||
if (admins.length) {
|
||||
const adminString = lazy._("detail.admin", admins.join(", "));
|
||||
const adminString = lazy.l10n.formatValueSync("detail-admin", {
|
||||
value: admins.join(", "),
|
||||
});
|
||||
conv.writeMessage(account.userId, adminString, {
|
||||
system: true,
|
||||
});
|
||||
}
|
||||
|
||||
if (moderators.length) {
|
||||
const moderatorString = lazy._("detail.moderator", moderators.join(", "));
|
||||
const moderatorString = lazy.l10n.formatValueSync("detail-moderator", {
|
||||
value: moderators.join(", "),
|
||||
});
|
||||
conv.writeMessage(account.userId, moderatorString, {
|
||||
system: true,
|
||||
});
|
||||
|
@ -160,14 +175,16 @@ function publishRoomDetails(account, conv) {
|
|||
aliases.unshift(canonicalAlias);
|
||||
}
|
||||
if (aliases.length) {
|
||||
const aliasString = lazy._("detail.alias", aliases.join(","));
|
||||
const aliasString = lazy.l10n.formatValueSync("detail-alias", {
|
||||
value: aliases.join(","),
|
||||
});
|
||||
conv.writeMessage(account.userId, aliasString, {
|
||||
system: true,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
conv.writeMessage(account.userId, lazy._("detail.power"), {
|
||||
conv.writeMessage(account.userId, lazy.l10n.formatValueSync("detail-power"), {
|
||||
system: true,
|
||||
});
|
||||
|
||||
|
@ -300,21 +317,25 @@ export var commands = [
|
|||
{
|
||||
name: "ban",
|
||||
get helpString() {
|
||||
return lazy._("command.ban", "ban");
|
||||
return lazy.l10n.formatValueSync("command-ban", { commandName: "ban" });
|
||||
},
|
||||
run: clientCommand("ban", 2, { requiredCount: 1 }),
|
||||
},
|
||||
{
|
||||
name: "unban",
|
||||
get helpString() {
|
||||
return lazy._("command.unban", "unban");
|
||||
return lazy.l10n.formatValueSync("command-unban", {
|
||||
commandName: "unban",
|
||||
});
|
||||
},
|
||||
run: clientCommand("unban", 1),
|
||||
},
|
||||
{
|
||||
name: "invite",
|
||||
get helpString() {
|
||||
return lazy._("command.invite", "invite");
|
||||
return lazy.l10n.formatValueSync("command-invite", {
|
||||
commandName: "invite",
|
||||
});
|
||||
},
|
||||
usageContext: IMServices.cmd.COMMAND_CONTEXT.CHAT,
|
||||
run: clientCommand("invite", 1),
|
||||
|
@ -322,14 +343,14 @@ export var commands = [
|
|||
{
|
||||
name: "kick",
|
||||
get helpString() {
|
||||
return lazy._("command.kick", "kick");
|
||||
return lazy.l10n.formatValueSync("command-kick", { commandName: "kick" });
|
||||
},
|
||||
run: clientCommand("kick", 2, { requiredCount: 1 }),
|
||||
},
|
||||
{
|
||||
name: "op",
|
||||
get helpString() {
|
||||
return lazy._("command.op", "op");
|
||||
return lazy.l10n.formatValueSync("command-op", { commandName: "op" });
|
||||
},
|
||||
usageContext: IMServices.cmd.COMMAND_CONTEXT.CHAT,
|
||||
run: clientCommand("setPowerLevel", 2, {
|
||||
|
@ -349,7 +370,7 @@ export var commands = [
|
|||
{
|
||||
name: "deop",
|
||||
get helpString() {
|
||||
return lazy._("command.deop", "deop");
|
||||
return lazy.l10n.formatValueSync("command-deop", { commandName: "deop" });
|
||||
},
|
||||
usageContext: IMServices.cmd.COMMAND_CONTEXT.CHAT,
|
||||
run: clientCommand("setPowerLevel", 1, {
|
||||
|
@ -361,14 +382,18 @@ export var commands = [
|
|||
{
|
||||
name: "part",
|
||||
get helpString() {
|
||||
return lazy._("command.leave", "part");
|
||||
return lazy.l10n.formatValueSync("command-leave", {
|
||||
commandName: "part",
|
||||
});
|
||||
},
|
||||
run: clientCommand("leave", 0),
|
||||
},
|
||||
{
|
||||
name: "topic",
|
||||
get helpString() {
|
||||
return lazy._("command.topic", "topic");
|
||||
return lazy.l10n.formatValueSync("command-topic", {
|
||||
commandName: "topic",
|
||||
});
|
||||
},
|
||||
run: runCommand((account, conv, [, topic]) => {
|
||||
conv.topic = topic;
|
||||
|
@ -378,7 +403,9 @@ export var commands = [
|
|||
{
|
||||
name: "visibility",
|
||||
get helpString() {
|
||||
return lazy._("command.visibility", "visibility");
|
||||
return lazy.l10n.formatValueSync("command-visibility", {
|
||||
commandName: "visibility",
|
||||
});
|
||||
},
|
||||
run: clientCommand("setRoomDirectoryVisibility", 1, {
|
||||
formatParams(conv, [visibilityString]) {
|
||||
|
@ -393,14 +420,18 @@ export var commands = [
|
|||
{
|
||||
name: "roomname",
|
||||
get helpString() {
|
||||
return lazy._("command.roomname", "roomname");
|
||||
return lazy.l10n.formatValueSync("command-roomname", {
|
||||
commandName: "roomname",
|
||||
});
|
||||
},
|
||||
run: clientCommand("setRoomName", 1),
|
||||
},
|
||||
{
|
||||
name: "detail",
|
||||
get helpString() {
|
||||
return lazy._("command.detail", "detail");
|
||||
return lazy.l10n.formatValueSync("command-detail", {
|
||||
commandName: "detail",
|
||||
});
|
||||
},
|
||||
run(msg, convObj) {
|
||||
const account = getAccount(convObj);
|
||||
|
@ -412,7 +443,9 @@ export var commands = [
|
|||
{
|
||||
name: "addalias",
|
||||
get helpString() {
|
||||
return lazy._("command.addalias", "addalias");
|
||||
return lazy.l10n.formatValueSync("command-addalias", {
|
||||
commandName: "addalias",
|
||||
});
|
||||
},
|
||||
run: clientCommand("createAlias", 1, {
|
||||
formatParams(conv, [alias]) {
|
||||
|
@ -423,7 +456,9 @@ export var commands = [
|
|||
{
|
||||
name: "removealias",
|
||||
get helpString() {
|
||||
return lazy._("command.removealias", "removealias");
|
||||
return lazy.l10n.formatValueSync("command-removealias", {
|
||||
commandName: "removealias",
|
||||
});
|
||||
},
|
||||
run: clientCommand("deleteAlias", 1, {
|
||||
formatParams(conv, [alias]) {
|
||||
|
@ -434,7 +469,7 @@ export var commands = [
|
|||
{
|
||||
name: "me",
|
||||
get helpString() {
|
||||
return lazy._("command.me", "me");
|
||||
return lazy.l10n.formatValueSync("command-me", { commandName: "me" });
|
||||
},
|
||||
run: runCommand((account, conv, [, message]) => {
|
||||
conv.sendMsg(message, true);
|
||||
|
@ -444,7 +479,7 @@ export var commands = [
|
|||
{
|
||||
name: "msg",
|
||||
get helpString() {
|
||||
return lazy._("command.msg", "msg");
|
||||
return lazy.l10n.formatValueSync("command-msg", { commandName: "msg" });
|
||||
},
|
||||
run: runCommand((account, conv, [, userId, message]) => {
|
||||
const room = account.getDirectConversation(userId);
|
||||
|
@ -461,7 +496,7 @@ export var commands = [
|
|||
{
|
||||
name: "join",
|
||||
get helpString() {
|
||||
return lazy._("command.join", "join");
|
||||
return lazy.l10n.formatValueSync("command-join", { commandName: "join" });
|
||||
},
|
||||
run: runCommand(
|
||||
(account, conv, [, joinRoomId]) => {
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import { l10nHelper } from "resource:///modules/imXPCOMUtils.sys.mjs";
|
||||
import { MatrixSDK } from "resource:///modules/matrix-sdk.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
|
@ -16,8 +15,10 @@ ChromeUtils.defineLazyGetter(lazy, "TXTToHTML", function () {
|
|||
);
|
||||
return aTxt => cs.scanTXT(aTxt, cs.kEntities);
|
||||
});
|
||||
ChromeUtils.defineLazyGetter(lazy, "_", () =>
|
||||
l10nHelper("chrome://chat/locale/matrix.properties")
|
||||
ChromeUtils.defineLazyGetter(
|
||||
lazy,
|
||||
"l10n",
|
||||
() => new Localization(["chat/matrix-properties.ftl"], true)
|
||||
);
|
||||
|
||||
const kRichBodiedTypes = [
|
||||
|
@ -285,7 +286,7 @@ export var MatrixMessageContent = {
|
|||
const type = event.getType();
|
||||
const content = event.getContent();
|
||||
if (event.isRedacted()) {
|
||||
return lazy._("message.redacted");
|
||||
return lazy.l10n.formatValueSync("message-redacted");
|
||||
}
|
||||
const textForEvent = lazy.getMatrixTextForEvent(event);
|
||||
if (textForEvent) {
|
||||
|
@ -302,7 +303,7 @@ export var MatrixMessageContent = {
|
|||
return attachmentUrl;
|
||||
}
|
||||
} else if (event.isBeingDecrypted() || event.shouldAttemptDecryption()) {
|
||||
return lazy._("message.decrypting");
|
||||
return lazy.l10n.formatValueSync("message-decrypting");
|
||||
}
|
||||
} else if (type == MatrixSDK.EventType.Sticker) {
|
||||
const attachmentUrl = getAttachmentUrl(content, homeserverUrl);
|
||||
|
@ -312,12 +313,11 @@ export var MatrixMessageContent = {
|
|||
} else if (type == MatrixSDK.EventType.Reaction) {
|
||||
const annotatedEvent = getEvent(content["m.relates_to"]?.event_id);
|
||||
if (annotatedEvent && content["m.relates_to"]?.key) {
|
||||
return lazy._(
|
||||
"message.reaction",
|
||||
event.getSender(),
|
||||
annotatedEvent.getSender(),
|
||||
lazy.TXTToHTML(content["m.relates_to"].key)
|
||||
);
|
||||
return lazy.l10n.formatValueSync("message-reaction", {
|
||||
userThatReacted: event.getSender(),
|
||||
userThatSentMessage: annotatedEvent.getSender(),
|
||||
reaction: lazy.TXTToHTML(content["m.relates_to"].key),
|
||||
});
|
||||
}
|
||||
}
|
||||
return lazy.TXTToHTML(content.body ?? "");
|
||||
|
@ -344,7 +344,7 @@ export var MatrixMessageContent = {
|
|||
const type = event.getType();
|
||||
const content = event.getContent();
|
||||
if (event.isRedacted()) {
|
||||
return lazy._("message.redacted");
|
||||
return lazy.l10n.formatValueSync("message-redacted");
|
||||
}
|
||||
if (type == MatrixSDK.EventType.RoomMessage) {
|
||||
if (
|
||||
|
@ -361,12 +361,11 @@ export var MatrixMessageContent = {
|
|||
} else if (type == MatrixSDK.EventType.Reaction) {
|
||||
const annotatedEvent = getEvent(content["m.relates_to"]?.event_id);
|
||||
if (annotatedEvent && content["m.relates_to"]?.key) {
|
||||
return lazy._(
|
||||
"message.reaction",
|
||||
`<span class="ib-person">${event.getSender()}</span>`,
|
||||
`<span class="ib-person">${annotatedEvent.getSender()}</span>`,
|
||||
lazy.TXTToHTML(content["m.relates_to"].key)
|
||||
);
|
||||
return lazy.l10n.formatValueSync("message-reaction", {
|
||||
userThatReacted: `<span class="ib-person">${event.getSender()}</span>`,
|
||||
userThatSentMessage: `<span class="ib-person">${annotatedEvent.getSender()}</span>`,
|
||||
reaction: lazy.TXTToHTML(content["m.relates_to"].key),
|
||||
});
|
||||
}
|
||||
}
|
||||
return MatrixMessageContent.getIncomingPlain(
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import { l10nHelper } from "resource:///modules/imXPCOMUtils.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineLazyGetter(lazy, "_", () =>
|
||||
l10nHelper("chrome://chat/locale/matrix.properties")
|
||||
ChromeUtils.defineLazyGetter(
|
||||
lazy,
|
||||
"l10n",
|
||||
() => new Localization(["chat/matrix-properties.ftl"], true)
|
||||
);
|
||||
|
||||
// See https://matrix.org/docs/spec/client_server/r0.5.0#m-room-power-levels
|
||||
|
@ -26,17 +26,20 @@ export var MatrixPowerLevels = {
|
|||
* @returns {string} Representation of the power level including the raw level.
|
||||
*/
|
||||
toText(powerLevel, defaultLevel = MatrixPowerLevels.user) {
|
||||
let levelName = lazy._("powerLevel.custom");
|
||||
let levelName = lazy.l10n.formatValueSync("power-level-custom");
|
||||
if (powerLevel == MatrixPowerLevels.admin) {
|
||||
levelName = lazy._("powerLevel.admin");
|
||||
levelName = lazy.l10n.formatValueSync("power-level-admin");
|
||||
} else if (powerLevel == MatrixPowerLevels.moderator) {
|
||||
levelName = lazy._("powerLevel.moderator");
|
||||
levelName = lazy.l10n.formatValueSync("power-level-moderator");
|
||||
} else if (powerLevel < defaultLevel) {
|
||||
levelName = lazy._("powerLevel.restricted");
|
||||
levelName = lazy.l10n.formatValueSync("power-level-restricted");
|
||||
} else if (powerLevel == defaultLevel) {
|
||||
levelName = lazy._("powerLevel.default");
|
||||
levelName = lazy.l10n.formatValueSync("power-level-default");
|
||||
}
|
||||
return lazy._("powerLevel.detailed", levelName, powerLevel);
|
||||
return lazy.l10n.formatValueSync("power-level-detailed", {
|
||||
powerLevelName: levelName,
|
||||
powerLevelNumber: powerLevel,
|
||||
});
|
||||
},
|
||||
/**
|
||||
* @param {object} powerLevels - m.room.power_levels event contents.
|
||||
|
|
|
@ -2,13 +2,14 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import { l10nHelper } from "resource:///modules/imXPCOMUtils.sys.mjs";
|
||||
import { MatrixSDK } from "resource:///modules/matrix-sdk.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineLazyGetter(lazy, "_", () =>
|
||||
l10nHelper("chrome://chat/locale/matrix.properties")
|
||||
ChromeUtils.defineLazyGetter(
|
||||
lazy,
|
||||
"l10n",
|
||||
() => new Localization(["chat/matrix-properties.ftl"], true)
|
||||
);
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
|
@ -24,7 +25,10 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
|||
* @returns {string}
|
||||
*/
|
||||
const keyVerificationRequest = (matrixEvent, { sender, content }) => {
|
||||
return lazy._("message.verification.request2", sender, content.to);
|
||||
return lazy.l10n.formatValueSync("message-verification-request2", {
|
||||
user: sender,
|
||||
userReceiving: content.to || "",
|
||||
});
|
||||
};
|
||||
/**
|
||||
* Shared handler for room messages, since those come in the plain text and
|
||||
|
@ -34,7 +38,8 @@ const roomMessage = {
|
|||
pivot: "msgtype",
|
||||
handlers: {
|
||||
[MatrixSDK.MsgType.KeyVerificationRequest]: keyVerificationRequest,
|
||||
"m.bad.encrypted": () => lazy._("message.decryptionError"),
|
||||
"m.bad.encrypted": () =>
|
||||
lazy.l10n.formatValueSync("message-decryption-error"),
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -68,31 +73,34 @@ const MATRIX_EVENT_HANDLERS = {
|
|||
target: matrixEvent.target,
|
||||
prevContent: matrixEvent.getPrevContent(),
|
||||
reason: content.reason,
|
||||
withReasonKey: content.reason ? "WithReason" : "",
|
||||
withReasonKey: content.reason ? "-with-reason" : "",
|
||||
};
|
||||
},
|
||||
handlers: {
|
||||
ban(matrixEvent, { sender, target, reason, withReasonKey }) {
|
||||
return lazy._(
|
||||
"message.banned" + withReasonKey,
|
||||
sender,
|
||||
target.userId,
|
||||
reason
|
||||
);
|
||||
return lazy.l10n.formatValueSync(`message-banned${withReasonKey}`, {
|
||||
user: sender,
|
||||
userBanned: target.userId,
|
||||
reason,
|
||||
});
|
||||
},
|
||||
invite(matrixEvent, { sender, content, target }) {
|
||||
const thirdPartyInvite = content.third_party_invite;
|
||||
if (thirdPartyInvite) {
|
||||
if (thirdPartyInvite.display_name) {
|
||||
return lazy._(
|
||||
"message.acceptedInviteFor",
|
||||
target.userId,
|
||||
thirdPartyInvite.display_name
|
||||
);
|
||||
return lazy.l10n.formatValueSync("message-accepted-invite-for", {
|
||||
user: target.userId,
|
||||
userWhoSent: thirdPartyInvite.display_name,
|
||||
});
|
||||
}
|
||||
return lazy._("message.acceptedInvite", target.userId);
|
||||
return lazy.l10n.formatValueSync("message-accepted-invite", {
|
||||
user: target.userId,
|
||||
});
|
||||
}
|
||||
return lazy._("message.invited", sender, target.userId);
|
||||
return lazy.l10n.formatValueSync("message-invited", {
|
||||
user: sender,
|
||||
userWhoGotInvited: target.userId,
|
||||
});
|
||||
},
|
||||
join(matrixEvent, { sender, content, prevContent, target }) {
|
||||
if (prevContent && prevContent.membership == "join") {
|
||||
|
@ -101,28 +109,27 @@ const MATRIX_EVENT_HANDLERS = {
|
|||
content.displayname &&
|
||||
prevContent.displayname != content.displayname
|
||||
) {
|
||||
return lazy._(
|
||||
"message.displayName.changed",
|
||||
sender,
|
||||
prevContent.displayname,
|
||||
content.displayname
|
||||
);
|
||||
return lazy.l10n.formatValueSync("message-display-name-changed", {
|
||||
user: sender,
|
||||
oldDisplayName: prevContent.displayname,
|
||||
newDisplayName: content.displayname,
|
||||
});
|
||||
} else if (!prevContent.displayname && content.displayname) {
|
||||
return lazy._(
|
||||
"message.displayName.set",
|
||||
sender,
|
||||
content.displayname
|
||||
);
|
||||
return lazy.l10n.formatValueSync("message-display-name-set", {
|
||||
user: sender,
|
||||
changedName: content.displayname,
|
||||
});
|
||||
} else if (prevContent.displayname && !content.displayname) {
|
||||
return lazy._(
|
||||
"message.displayName.remove",
|
||||
sender,
|
||||
prevContent.displayname
|
||||
);
|
||||
return lazy.l10n.formatValueSync("message-display-name-remove", {
|
||||
user: sender,
|
||||
nameRemoved: prevContent.displayname,
|
||||
});
|
||||
}
|
||||
return null;
|
||||
}
|
||||
return lazy._("message.joined", target.userId);
|
||||
return lazy.l10n.formatValueSync("message-joined", {
|
||||
user: target.userId,
|
||||
});
|
||||
},
|
||||
leave(
|
||||
matrixEvent,
|
||||
|
@ -132,24 +139,32 @@ const MATRIX_EVENT_HANDLERS = {
|
|||
// So we need to look at each transition to what happened to the user.
|
||||
if (matrixEvent.getSender() === target.userId) {
|
||||
if (prevContent.membership === "invite") {
|
||||
return lazy._("message.rejectedInvite", target.userId);
|
||||
return lazy.l10n.formatValueSync("message-rejected-invite", {
|
||||
user: target.userId,
|
||||
});
|
||||
}
|
||||
return lazy._("message.left", target.userId);
|
||||
return lazy.l10n.formatValueSync("message-left", {
|
||||
user: target.userId,
|
||||
});
|
||||
} else if (prevContent.membership === "ban") {
|
||||
return lazy._("message.unbanned", sender, target.userId);
|
||||
return lazy.l10n.formatValueSync("message-unbanned", {
|
||||
user: sender,
|
||||
userUnbanned: target.userId,
|
||||
});
|
||||
} else if (prevContent.membership === "join") {
|
||||
return lazy._(
|
||||
"message.kicked" + withReasonKey,
|
||||
sender,
|
||||
target.userId,
|
||||
reason
|
||||
);
|
||||
return lazy.l10n.formatValueSync(`message-kicked${withReasonKey}`, {
|
||||
user: sender,
|
||||
userGotKicked: target.userId,
|
||||
reason,
|
||||
});
|
||||
} else if (prevContent.membership === "invite") {
|
||||
return lazy._(
|
||||
"message.withdrewInvite" + withReasonKey,
|
||||
sender,
|
||||
target.userId,
|
||||
reason
|
||||
return lazy.l10n.formatValueSync(
|
||||
`message-withdrew-invite${withReasonKey}`,
|
||||
{
|
||||
user: sender,
|
||||
userInvitationWithdrawn: target.userId,
|
||||
reason,
|
||||
}
|
||||
);
|
||||
}
|
||||
// ignore rest of the cases.
|
||||
|
@ -178,12 +193,17 @@ const MATRIX_EVENT_HANDLERS = {
|
|||
// Handling the case where there are multiple changes.
|
||||
// Example : "@Mr.B:matrix.org changed the power level of
|
||||
// @Mr.B:matrix.org from Default (0) to Moderator (50)."
|
||||
return lazy._(
|
||||
"message.powerLevel.fromTo",
|
||||
userId,
|
||||
lazy.MatrixPowerLevels.toText(prevPowerLevel, prevDefault),
|
||||
lazy.MatrixPowerLevels.toText(currentPowerLevel, userDefault)
|
||||
);
|
||||
return lazy.l10n.formatValueSync("message-power-level-from-to", {
|
||||
user: userId,
|
||||
oldPowerLevel: lazy.MatrixPowerLevels.toText(
|
||||
prevPowerLevel,
|
||||
prevDefault
|
||||
),
|
||||
newPowerLevel: lazy.MatrixPowerLevels.toText(
|
||||
currentPowerLevel,
|
||||
userDefault
|
||||
),
|
||||
});
|
||||
}
|
||||
return null;
|
||||
})
|
||||
|
@ -193,26 +213,38 @@ const MATRIX_EVENT_HANDLERS = {
|
|||
if (!changes.length) {
|
||||
return null;
|
||||
}
|
||||
return lazy._("message.powerLevel.changed", sender, changes.join(", "));
|
||||
return lazy.l10n.formatValueSync("message-power-level-changed", {
|
||||
user: sender,
|
||||
powerLevelChanges: changes.join(", "),
|
||||
});
|
||||
},
|
||||
},
|
||||
[MatrixSDK.EventType.RoomName]: {
|
||||
handler(matrixEvent, { sender, content }) {
|
||||
const roomName = content.name;
|
||||
if (!roomName) {
|
||||
return lazy._("message.roomName.remove", sender);
|
||||
return lazy.l10n.formatValueSync("message-room-name-remove", {
|
||||
user: sender,
|
||||
});
|
||||
}
|
||||
return lazy._("message.roomName.changed", sender, roomName);
|
||||
return lazy.l10n.formatValueSync("message-room-name-changed", {
|
||||
user: sender,
|
||||
newRoomName: roomName,
|
||||
});
|
||||
},
|
||||
},
|
||||
[MatrixSDK.EventType.RoomGuestAccess]: {
|
||||
pivot: "guest_access",
|
||||
handlers: {
|
||||
[MatrixSDK.GuestAccess.Forbidden](matrixEvent, { sender }) {
|
||||
return lazy._("message.guest.prevented", sender);
|
||||
return lazy.l10n.formatValueSync("message-guest-prevented", {
|
||||
user: sender,
|
||||
});
|
||||
},
|
||||
[MatrixSDK.GuestAccess.CanJoin](matrixEvent, { sender }) {
|
||||
return lazy._("message.guest.allowed", sender);
|
||||
return lazy.l10n.formatValueSync("message-guest-allowed", {
|
||||
user: sender,
|
||||
});
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -220,16 +252,24 @@ const MATRIX_EVENT_HANDLERS = {
|
|||
pivot: "history_visibility",
|
||||
handlers: {
|
||||
[MatrixSDK.HistoryVisibility.WorldReadable](matrixEvent, { sender }) {
|
||||
return lazy._("message.history.anyone", sender);
|
||||
return lazy.l10n.formatValueSync("message-history-anyone", {
|
||||
user: sender,
|
||||
});
|
||||
},
|
||||
[MatrixSDK.HistoryVisibility.Shared](matrixEvent, { sender }) {
|
||||
return lazy._("message.history.shared", sender);
|
||||
return lazy.l10n.formatValueSync("message-history-shared", {
|
||||
user: sender,
|
||||
});
|
||||
},
|
||||
[MatrixSDK.HistoryVisibility.Invited](matrixEvent, { sender }) {
|
||||
return lazy._("message.history.invited", sender);
|
||||
return lazy.l10n.formatValueSync("message-history-invited", {
|
||||
user: sender,
|
||||
});
|
||||
},
|
||||
[MatrixSDK.HistoryVisibility.Joined](matrixEvent, { sender }) {
|
||||
return lazy._("message.history.joined", sender);
|
||||
return lazy.l10n.formatValueSync("message-history-joined", {
|
||||
user: sender,
|
||||
});
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -237,12 +277,11 @@ const MATRIX_EVENT_HANDLERS = {
|
|||
handler(matrixEvent, { sender, content }) {
|
||||
const prevContent = matrixEvent.getPrevContent();
|
||||
if (content.alias != prevContent.alias) {
|
||||
return lazy._(
|
||||
"message.alias.main",
|
||||
sender,
|
||||
prevContent.alias,
|
||||
content.alias
|
||||
);
|
||||
return lazy.l10n.formatValueSync("message-alias-main", {
|
||||
user: sender,
|
||||
oldAddress: prevContent.alias || "",
|
||||
newAddress: content.alias,
|
||||
});
|
||||
}
|
||||
const prevAliases = prevContent.alt_aliases || [];
|
||||
const aliases = content.alt_aliases || [];
|
||||
|
@ -253,16 +292,21 @@ const MATRIX_EVENT_HANDLERS = {
|
|||
.filter(alias => !aliases.includes(alias))
|
||||
.join(", ");
|
||||
if (addedAliases && removedAliases) {
|
||||
return lazy._(
|
||||
"message.alias.removedAndAdded",
|
||||
sender,
|
||||
removedAliases,
|
||||
addedAliases
|
||||
);
|
||||
return lazy.l10n.formatValueSync("message-alias-removed-and-added", {
|
||||
user: sender,
|
||||
removedAddresses: removedAliases,
|
||||
addedAddresses: addedAliases,
|
||||
});
|
||||
} else if (removedAliases) {
|
||||
return lazy._("message.alias.removed", sender, removedAliases);
|
||||
return lazy.l10n.formatValueSync("message-alias-removed", {
|
||||
user: sender,
|
||||
addresses: removedAliases,
|
||||
});
|
||||
} else if (addedAliases) {
|
||||
return lazy._("message.alias.added", sender, addedAliases);
|
||||
return lazy.l10n.formatValueSync("message-alias-added", {
|
||||
user: sender,
|
||||
addresses: addedAliases,
|
||||
});
|
||||
}
|
||||
// No discernible changes to aliases
|
||||
return null;
|
||||
|
@ -276,17 +320,20 @@ const MATRIX_EVENT_HANDLERS = {
|
|||
},
|
||||
[MatrixSDK.EventType.KeyVerificationCancel]: {
|
||||
handler(matrixEvent, { sender, content }) {
|
||||
return lazy._("message.verification.cancel2", sender, content.reason);
|
||||
return lazy.l10n.formatValueSync("message-verification-cancel2", {
|
||||
user: sender,
|
||||
reason: content.reason,
|
||||
});
|
||||
},
|
||||
},
|
||||
[MatrixSDK.EventType.KeyVerificationDone]: {
|
||||
handler() {
|
||||
return lazy._("message.verification.done");
|
||||
return lazy.l10n.formatValueSync("message-verification-done");
|
||||
},
|
||||
},
|
||||
[MatrixSDK.EventType.RoomEncryption]: {
|
||||
handler() {
|
||||
return lazy._("message.encryptionStart");
|
||||
return lazy.l10n.formatValueSync("message-encryption-start");
|
||||
},
|
||||
},
|
||||
|
||||
|
|
|
@ -10,10 +10,7 @@ const { XPCShellContentUtils } = ChromeUtils.importESModule(
|
|||
var { getMatrixTextForEvent } = ChromeUtils.importESModule(
|
||||
"resource:///modules/matrixTextForEvent.sys.mjs"
|
||||
);
|
||||
var { l10nHelper } = ChromeUtils.importESModule(
|
||||
"resource:///modules/imXPCOMUtils.sys.mjs"
|
||||
);
|
||||
var _ = l10nHelper("chrome://chat/locale/matrix.properties");
|
||||
var l10n = new Localization(["chat/matrix-properties.ftl"], true);
|
||||
|
||||
// Required to make it so the DOMParser can handle images and such.
|
||||
XPCShellContentUtils.init(this);
|
||||
|
@ -206,7 +203,7 @@ dolor sit amet`,
|
|||
type: MatrixSDK.EventType.RoomMessageEncrypted,
|
||||
decrypting: true,
|
||||
},
|
||||
result: _("message.decrypting"),
|
||||
result: l10n.formatValueSync("message-decrypting"),
|
||||
},
|
||||
{
|
||||
description: "Unsent event",
|
||||
|
@ -229,7 +226,7 @@ dolor sit amet`,
|
|||
sender: "@bar:example.com",
|
||||
redacted: true,
|
||||
},
|
||||
result: _("message.redacted"),
|
||||
result: l10n.formatValueSync("message-redacted"),
|
||||
},
|
||||
{
|
||||
description: "Tombstone",
|
||||
|
@ -273,7 +270,11 @@ dolor sit amet`,
|
|||
},
|
||||
sender: "@foo:example.com",
|
||||
},
|
||||
result: _("message.reaction", "@bar:example.com", "@foo:example.com", "🐦"),
|
||||
result: l10n.formatValueSync("message-reaction", {
|
||||
userThatReacted: "@bar:example.com",
|
||||
userThatSentMessage: "@foo:example.com",
|
||||
reaction: "🐦",
|
||||
}),
|
||||
},
|
||||
];
|
||||
|
||||
|
@ -532,7 +533,7 @@ dolor sit amet`,
|
|||
sender: "@bar:example.com",
|
||||
redacted: true,
|
||||
},
|
||||
result: _("message.redacted"),
|
||||
result: l10n.formatValueSync("message-redacted"),
|
||||
},
|
||||
{
|
||||
description: "Tombstone",
|
||||
|
@ -576,12 +577,11 @@ dolor sit amet`,
|
|||
},
|
||||
sender: "@foo:example.com",
|
||||
},
|
||||
result: _(
|
||||
"message.reaction",
|
||||
'<span class="ib-person">@bar:example.com</span>',
|
||||
'<span class="ib-person">@foo:example.com</span>',
|
||||
"🐦"
|
||||
),
|
||||
result: l10n.formatValueSync("message-reaction", {
|
||||
userThatReacted: '<span class="ib-person">@bar:example.com</span>',
|
||||
userThatSentMessage: '<span class="ib-person">@foo:example.com</span>',
|
||||
reaction: "🐦",
|
||||
}),
|
||||
},
|
||||
{
|
||||
description: "URL encoded mention",
|
||||
|
|
|
@ -4,62 +4,62 @@
|
|||
var { MatrixPowerLevels } = ChromeUtils.importESModule(
|
||||
"resource:///modules/matrixPowerLevels.sys.mjs"
|
||||
);
|
||||
var { l10nHelper } = ChromeUtils.importESModule(
|
||||
"resource:///modules/imXPCOMUtils.sys.mjs"
|
||||
);
|
||||
var _ = l10nHelper("chrome://chat/locale/matrix.properties");
|
||||
var l10n = new Localization(["chat/matrix-properties.ftl"], true);
|
||||
|
||||
const TO_TEXT_FIXTURES = [
|
||||
{
|
||||
level: MatrixPowerLevels.user,
|
||||
defaultLevel: MatrixPowerLevels.user,
|
||||
result: _(
|
||||
"powerLevel.detailed",
|
||||
_("powerLevel.default"),
|
||||
MatrixPowerLevels.user
|
||||
),
|
||||
result: l10n.formatValueSync("power-level-detailed", {
|
||||
powerLevelName: l10n.formatValueSync("power-level-default"),
|
||||
powerLevelNumber: MatrixPowerLevels.user,
|
||||
}),
|
||||
name: "Default power level for default 0",
|
||||
},
|
||||
{
|
||||
level: MatrixPowerLevels.user,
|
||||
defaultLevel: 10,
|
||||
result: _(
|
||||
"powerLevel.detailed",
|
||||
_("powerLevel.restricted"),
|
||||
MatrixPowerLevels.user
|
||||
),
|
||||
result: l10n.formatValueSync("power-level-detailed", {
|
||||
powerLevelName: l10n.formatValueSync("power-level-restricted"),
|
||||
powerLevelNumber: MatrixPowerLevels.user,
|
||||
}),
|
||||
name: "Restricted power level",
|
||||
},
|
||||
{
|
||||
level: 10,
|
||||
defaultLevel: 10,
|
||||
result: _("powerLevel.detailed", _("powerLevel.default"), 10),
|
||||
result: l10n.formatValueSync("power-level-detailed", {
|
||||
powerLevelName: l10n.formatValueSync("power-level-default"),
|
||||
powerLevelNumber: 10,
|
||||
}),
|
||||
name: "Default power level for default 10",
|
||||
},
|
||||
{
|
||||
level: MatrixPowerLevels.moderator,
|
||||
defaultLevel: MatrixPowerLevels.user,
|
||||
result: _(
|
||||
"powerLevel.detailed",
|
||||
_("powerLevel.moderator"),
|
||||
MatrixPowerLevels.moderator
|
||||
),
|
||||
result: l10n.formatValueSync("power-level-detailed", {
|
||||
powerLevelName: l10n.formatValueSync("power-level-moderator"),
|
||||
powerLevelNumber: MatrixPowerLevels.moderator,
|
||||
}),
|
||||
name: "Moderator",
|
||||
},
|
||||
{
|
||||
level: MatrixPowerLevels.admin,
|
||||
defaultLevel: MatrixPowerLevels.user,
|
||||
result: _(
|
||||
"powerLevel.detailed",
|
||||
_("powerLevel.admin"),
|
||||
MatrixPowerLevels.admin
|
||||
),
|
||||
result: l10n.formatValueSync("power-level-detailed", {
|
||||
powerLevelName: l10n.formatValueSync("power-level-admin"),
|
||||
powerLevelNumber: MatrixPowerLevels.admin,
|
||||
}),
|
||||
name: "Admin",
|
||||
},
|
||||
{
|
||||
level: 25,
|
||||
defaultLevel: MatrixPowerLevels.user,
|
||||
result: _("powerLevel.detailed", _("powerLevel.custom"), 25),
|
||||
result: l10n.formatValueSync("power-level-detailed", {
|
||||
powerLevelName: l10n.formatValueSync("power-level-custom"),
|
||||
powerLevelNumber: 25,
|
||||
}),
|
||||
|
||||
name: "Custom power level 25",
|
||||
},
|
||||
];
|
||||
|
|
|
@ -4,10 +4,7 @@
|
|||
var { getMatrixTextForEvent } = ChromeUtils.importESModule(
|
||||
"resource:///modules/matrixTextForEvent.sys.mjs"
|
||||
);
|
||||
var { l10nHelper } = ChromeUtils.importESModule(
|
||||
"resource:///modules/imXPCOMUtils.sys.mjs"
|
||||
);
|
||||
var _ = l10nHelper("chrome://chat/locale/matrix.properties");
|
||||
var l10n = new Localization(["chat/matrix-properties.ftl"], true);
|
||||
|
||||
function run_test() {
|
||||
add_test(testGetTextForMatrixEvent);
|
||||
|
@ -27,7 +24,10 @@ const FIXTURES = [
|
|||
},
|
||||
sender: SENDER,
|
||||
}),
|
||||
result: _("message.banned", SENDER, "@foo:example.com"),
|
||||
result: l10n.formatValueSync("message-banned", {
|
||||
user: SENDER,
|
||||
userBanned: "@foo:example.com",
|
||||
}),
|
||||
name: "Banned without reason",
|
||||
},
|
||||
{
|
||||
|
@ -42,7 +42,11 @@ const FIXTURES = [
|
|||
},
|
||||
sender: SENDER,
|
||||
}),
|
||||
result: _("message.bannedWithReason", SENDER, "@foo:example.com", "test"),
|
||||
result: l10n.formatValueSync("message-banned-with-reason", {
|
||||
user: SENDER,
|
||||
userBanned: "@foo:example.com",
|
||||
reason: "test",
|
||||
}),
|
||||
name: "Banned with reason",
|
||||
},
|
||||
{
|
||||
|
@ -59,7 +63,10 @@ const FIXTURES = [
|
|||
},
|
||||
sender: SENDER,
|
||||
}),
|
||||
result: _("message.acceptedInviteFor", "@foo:example.com", "bar"),
|
||||
result: l10n.formatValueSync("message-accepted-invite-for", {
|
||||
user: "@foo:example.com",
|
||||
userWhoSent: "bar",
|
||||
}),
|
||||
name: "Invite accepted by other user with display name",
|
||||
},
|
||||
{
|
||||
|
@ -74,7 +81,9 @@ const FIXTURES = [
|
|||
},
|
||||
sender: SENDER,
|
||||
}),
|
||||
result: _("message.acceptedInvite", "@foo:example.com"),
|
||||
result: l10n.formatValueSync("message-accepted-invite", {
|
||||
user: "@foo:example.com",
|
||||
}),
|
||||
name: "Invite accepted by other user",
|
||||
},
|
||||
{
|
||||
|
@ -88,7 +97,10 @@ const FIXTURES = [
|
|||
},
|
||||
sender: SENDER,
|
||||
}),
|
||||
result: _("message.invited", SENDER, "@foo:example.com"),
|
||||
result: l10n.formatValueSync("message-invited", {
|
||||
user: SENDER,
|
||||
userWhoGotInvited: "@foo:example.com",
|
||||
}),
|
||||
name: "User invited",
|
||||
},
|
||||
{
|
||||
|
@ -104,7 +116,11 @@ const FIXTURES = [
|
|||
},
|
||||
sender: SENDER,
|
||||
}),
|
||||
result: _("message.displayName.changed", SENDER, "lorem", "ipsum"),
|
||||
result: l10n.formatValueSync("message-display-name-changed", {
|
||||
user: SENDER,
|
||||
oldDisplayName: "lorem",
|
||||
newDisplayName: "ipsum",
|
||||
}),
|
||||
name: "User changed their display name",
|
||||
},
|
||||
{
|
||||
|
@ -119,7 +135,10 @@ const FIXTURES = [
|
|||
},
|
||||
sender: SENDER,
|
||||
}),
|
||||
result: _("message.displayName.set", SENDER, "ipsum"),
|
||||
result: l10n.formatValueSync("message-display-name-set", {
|
||||
user: SENDER,
|
||||
changedName: "ipsum",
|
||||
}),
|
||||
name: "User set their display name",
|
||||
},
|
||||
{
|
||||
|
@ -134,7 +153,10 @@ const FIXTURES = [
|
|||
},
|
||||
sender: SENDER,
|
||||
}),
|
||||
result: _("message.displayName.remove", SENDER, "lorem"),
|
||||
result: l10n.formatValueSync("message-display-name-remove", {
|
||||
user: SENDER,
|
||||
nameRemoved: "lorem",
|
||||
}),
|
||||
name: "User removed their display name",
|
||||
},
|
||||
{
|
||||
|
@ -162,7 +184,9 @@ const FIXTURES = [
|
|||
},
|
||||
sender: SENDER,
|
||||
}),
|
||||
result: _("message.joined", "@foo:example.com"),
|
||||
result: l10n.formatValueSync("message-joined", {
|
||||
user: "@foo:example.com",
|
||||
}),
|
||||
name: "Users joined",
|
||||
},
|
||||
{
|
||||
|
@ -179,7 +203,9 @@ const FIXTURES = [
|
|||
},
|
||||
sender: SENDER,
|
||||
}),
|
||||
result: _("message.rejectedInvite", "@test:example.com"),
|
||||
result: l10n.formatValueSync("message-rejected-invite", {
|
||||
user: "@test:example.com",
|
||||
}),
|
||||
name: "Invite rejected",
|
||||
},
|
||||
{
|
||||
|
@ -196,7 +222,7 @@ const FIXTURES = [
|
|||
},
|
||||
sender: SENDER,
|
||||
}),
|
||||
result: _("message.left", "@test:example.com"),
|
||||
result: l10n.formatValueSync("message-left", { user: "@test:example.com" }),
|
||||
name: "Left room",
|
||||
},
|
||||
{
|
||||
|
@ -213,7 +239,10 @@ const FIXTURES = [
|
|||
},
|
||||
sender: SENDER,
|
||||
}),
|
||||
result: _("message.unbanned", SENDER, "@target:example.com"),
|
||||
result: l10n.formatValueSync("message-unbanned", {
|
||||
user: SENDER,
|
||||
userUnbanned: "@target:example.com",
|
||||
}),
|
||||
name: "Unbanned",
|
||||
},
|
||||
{
|
||||
|
@ -230,7 +259,10 @@ const FIXTURES = [
|
|||
},
|
||||
sender: SENDER,
|
||||
}),
|
||||
result: _("message.kicked", SENDER, "@target:example.com"),
|
||||
result: l10n.formatValueSync("message-kicked", {
|
||||
user: SENDER,
|
||||
userGotKicked: "@target:example.com",
|
||||
}),
|
||||
name: "Kicked without reason",
|
||||
},
|
||||
{
|
||||
|
@ -248,12 +280,11 @@ const FIXTURES = [
|
|||
},
|
||||
sender: SENDER,
|
||||
}),
|
||||
result: _(
|
||||
"message.kickedWithReason",
|
||||
SENDER,
|
||||
"@target:example.com",
|
||||
"lorem ipsum"
|
||||
),
|
||||
result: l10n.formatValueSync("message-kicked-with-reason", {
|
||||
user: SENDER,
|
||||
userGotKicked: "@target:example.com",
|
||||
reason: "lorem ipsum",
|
||||
}),
|
||||
name: "Kicked with reason",
|
||||
},
|
||||
{
|
||||
|
@ -271,12 +302,11 @@ const FIXTURES = [
|
|||
},
|
||||
sender: SENDER,
|
||||
}),
|
||||
result: _(
|
||||
"message.withdrewInviteWithReason",
|
||||
SENDER,
|
||||
"@target:example.com",
|
||||
"lorem ipsum"
|
||||
),
|
||||
result: l10n.formatValueSync("message-withdrew-invite-with-reason", {
|
||||
user: SENDER,
|
||||
userInvitationWithdrawn: "@target:example.com",
|
||||
reason: "lorem ipsum",
|
||||
}),
|
||||
name: "Invite withdrawn with reason",
|
||||
},
|
||||
{
|
||||
|
@ -293,7 +323,10 @@ const FIXTURES = [
|
|||
},
|
||||
sender: SENDER,
|
||||
}),
|
||||
result: _("message.withdrewInvite", SENDER, "@target:example.com"),
|
||||
result: l10n.formatValueSync("message-withdrew-invite", {
|
||||
user: SENDER,
|
||||
userInvitationWithdrawn: "@target:example.com",
|
||||
}),
|
||||
name: "Invite withdrawn without reason",
|
||||
},
|
||||
{
|
||||
|
@ -355,16 +388,14 @@ const FIXTURES = [
|
|||
},
|
||||
sender: SENDER,
|
||||
}),
|
||||
result: _(
|
||||
"message.powerLevel.changed",
|
||||
SENDER,
|
||||
_(
|
||||
"message.powerLevel.fromTo",
|
||||
"@foo:example.com",
|
||||
_("powerLevel.default") + " (0)",
|
||||
_("powerLevel.moderator") + " (50)"
|
||||
)
|
||||
),
|
||||
result: l10n.formatValueSync("message-power-level-changed", {
|
||||
user: SENDER,
|
||||
powerLevelChanges: l10n.formatValueSync("message-power-level-from-to", {
|
||||
user: "@foo:example.com",
|
||||
oldPowerLevel: l10n.formatValueSync("power-level-default") + " (0)",
|
||||
newPowerLevel: l10n.formatValueSync("power-level-moderator") + " (50)",
|
||||
}),
|
||||
}),
|
||||
name: "Gave a user power levels",
|
||||
},
|
||||
{
|
||||
|
@ -385,16 +416,14 @@ const FIXTURES = [
|
|||
},
|
||||
sender: SENDER,
|
||||
}),
|
||||
result: _(
|
||||
"message.powerLevel.changed",
|
||||
SENDER,
|
||||
_(
|
||||
"message.powerLevel.fromTo",
|
||||
"@foo:example.com",
|
||||
_("powerLevel.default") + " (10)",
|
||||
_("powerLevel.moderator") + " (50)"
|
||||
)
|
||||
),
|
||||
result: l10n.formatValueSync("message-power-level-changed", {
|
||||
user: SENDER,
|
||||
powerLevelChanges: l10n.formatValueSync("message-power-level-from-to", {
|
||||
user: "@foo:example.com",
|
||||
oldPowerLevel: l10n.formatValueSync("power-level-default") + " (10)",
|
||||
newPowerLevel: l10n.formatValueSync("power-level-moderator") + " (50)",
|
||||
}),
|
||||
}),
|
||||
name: "Gave a user power levels with default level",
|
||||
},
|
||||
{
|
||||
|
@ -416,16 +445,14 @@ const FIXTURES = [
|
|||
},
|
||||
sender: SENDER,
|
||||
}),
|
||||
result: _(
|
||||
"message.powerLevel.changed",
|
||||
SENDER,
|
||||
_(
|
||||
"message.powerLevel.fromTo",
|
||||
"@foo:example.com",
|
||||
_("powerLevel.restricted") + " (0)",
|
||||
_("powerLevel.default") + " (10)"
|
||||
)
|
||||
),
|
||||
result: l10n.formatValueSync("message-power-level-changed", {
|
||||
user: SENDER,
|
||||
powerLevelChanges: l10n.formatValueSync("message-power-level-from-to", {
|
||||
user: "@foo:example.com",
|
||||
oldPowerLevel: l10n.formatValueSync("power-level-restricted") + " (0)",
|
||||
newPowerLevel: l10n.formatValueSync("power-level-default") + " (10)",
|
||||
}),
|
||||
}),
|
||||
name: "Promote a restricted user to default",
|
||||
},
|
||||
{
|
||||
|
@ -446,16 +473,14 @@ const FIXTURES = [
|
|||
},
|
||||
sender: SENDER,
|
||||
}),
|
||||
result: _(
|
||||
"message.powerLevel.changed",
|
||||
SENDER,
|
||||
_(
|
||||
"message.powerLevel.fromTo",
|
||||
"@foo:example.com",
|
||||
_("powerLevel.moderator") + " (50)",
|
||||
_("powerLevel.admin") + " (100)"
|
||||
)
|
||||
),
|
||||
result: l10n.formatValueSync("message-power-level-changed", {
|
||||
user: SENDER,
|
||||
powerLevelChanges: l10n.formatValueSync("message-power-level-from-to", {
|
||||
user: "@foo:example.com",
|
||||
oldPowerLevel: l10n.formatValueSync("power-level-moderator") + " (50)",
|
||||
newPowerLevel: l10n.formatValueSync("power-level-admin") + " (100)",
|
||||
}),
|
||||
}),
|
||||
name: "Prompted user from moderator to admin",
|
||||
},
|
||||
{
|
||||
|
@ -476,16 +501,14 @@ const FIXTURES = [
|
|||
},
|
||||
sender: SENDER,
|
||||
}),
|
||||
result: _(
|
||||
"message.powerLevel.changed",
|
||||
SENDER,
|
||||
_(
|
||||
"message.powerLevel.fromTo",
|
||||
"@foo:example.com",
|
||||
_("powerLevel.admin") + " (100)",
|
||||
_("powerLevel.default") + " (0)"
|
||||
)
|
||||
),
|
||||
result: l10n.formatValueSync("message-power-level-changed", {
|
||||
user: SENDER,
|
||||
powerLevelChanges: l10n.formatValueSync("message-power-level-from-to", {
|
||||
user: "@foo:example.com",
|
||||
oldPowerLevel: l10n.formatValueSync("power-level-admin") + " (100)",
|
||||
newPowerLevel: l10n.formatValueSync("power-level-default") + " (0)",
|
||||
}),
|
||||
}),
|
||||
name: "Demote user from admin to default",
|
||||
},
|
||||
{
|
||||
|
@ -508,23 +531,23 @@ const FIXTURES = [
|
|||
},
|
||||
sender: SENDER,
|
||||
}),
|
||||
result: _(
|
||||
"message.powerLevel.changed",
|
||||
SENDER,
|
||||
_(
|
||||
"message.powerLevel.fromTo",
|
||||
"@foo:example.com",
|
||||
_("powerLevel.default") + " (0)",
|
||||
_("powerLevel.moderator") + " (50)"
|
||||
) +
|
||||
result: l10n.formatValueSync("message-power-level-changed", {
|
||||
user: SENDER,
|
||||
powerLevelChanges:
|
||||
l10n.formatValueSync("message-power-level-from-to", {
|
||||
user: "@foo:example.com",
|
||||
oldPowerLevel: l10n.formatValueSync("power-level-default") + " (0)",
|
||||
newPowerLevel:
|
||||
l10n.formatValueSync("power-level-moderator") + " (50)",
|
||||
}) +
|
||||
", " +
|
||||
_(
|
||||
"message.powerLevel.fromTo",
|
||||
"@bar:example.com",
|
||||
_("powerLevel.moderator") + " (50)",
|
||||
_("powerLevel.default") + " (0)"
|
||||
)
|
||||
),
|
||||
l10n.formatValueSync("message-power-level-from-to", {
|
||||
user: "@bar:example.com",
|
||||
oldPowerLevel:
|
||||
l10n.formatValueSync("power-level-moderator") + " (50)",
|
||||
newPowerLevel: l10n.formatValueSync("power-level-default") + " (0)",
|
||||
}),
|
||||
}),
|
||||
name: "Changed multiple users's power level",
|
||||
},
|
||||
{
|
||||
|
@ -535,7 +558,10 @@ const FIXTURES = [
|
|||
},
|
||||
sender: SENDER,
|
||||
}),
|
||||
result: _("message.roomName.changed", SENDER, "test"),
|
||||
result: l10n.formatValueSync("message-room-name-changed", {
|
||||
user: SENDER,
|
||||
newRoomName: "test",
|
||||
}),
|
||||
name: "Set room name",
|
||||
},
|
||||
{
|
||||
|
@ -543,7 +569,7 @@ const FIXTURES = [
|
|||
type: MatrixSDK.EventType.RoomName,
|
||||
sender: SENDER,
|
||||
}),
|
||||
result: _("message.roomName.remove", SENDER),
|
||||
result: l10n.formatValueSync("message-room-name-remove", { user: SENDER }),
|
||||
name: "Remove room name",
|
||||
},
|
||||
{
|
||||
|
@ -554,7 +580,7 @@ const FIXTURES = [
|
|||
},
|
||||
sender: SENDER,
|
||||
}),
|
||||
result: _("message.guest.prevented", SENDER),
|
||||
result: l10n.formatValueSync("message-guest-prevented", { user: SENDER }),
|
||||
name: "Guest access forbidden",
|
||||
},
|
||||
{
|
||||
|
@ -565,7 +591,7 @@ const FIXTURES = [
|
|||
},
|
||||
sender: SENDER,
|
||||
}),
|
||||
result: _("message.guest.allowed", SENDER),
|
||||
result: l10n.formatValueSync("message-guest-allowed", { user: SENDER }),
|
||||
name: "Guest access allowed",
|
||||
},
|
||||
{
|
||||
|
@ -576,7 +602,7 @@ const FIXTURES = [
|
|||
},
|
||||
sender: SENDER,
|
||||
}),
|
||||
result: _("message.history.anyone", SENDER),
|
||||
result: l10n.formatValueSync("message-history-anyone", { user: SENDER }),
|
||||
name: "History access granted to anyone",
|
||||
},
|
||||
{
|
||||
|
@ -587,7 +613,7 @@ const FIXTURES = [
|
|||
},
|
||||
sender: SENDER,
|
||||
}),
|
||||
result: _("message.history.shared", SENDER),
|
||||
result: l10n.formatValueSync("message-history-shared", { user: SENDER }),
|
||||
name: "History access granted to members, including before they joined",
|
||||
},
|
||||
{
|
||||
|
@ -598,7 +624,7 @@ const FIXTURES = [
|
|||
},
|
||||
sender: SENDER,
|
||||
}),
|
||||
result: _("message.history.invited", SENDER),
|
||||
result: l10n.formatValueSync("message-history-invited", { user: SENDER }),
|
||||
name: "History access granted to members, including invited",
|
||||
},
|
||||
{
|
||||
|
@ -609,7 +635,7 @@ const FIXTURES = [
|
|||
},
|
||||
sender: SENDER,
|
||||
}),
|
||||
result: _("message.history.joined", SENDER),
|
||||
result: l10n.formatValueSync("message-history-joined", { user: SENDER }),
|
||||
name: "History access granted to members from the point they join",
|
||||
},
|
||||
{
|
||||
|
@ -620,7 +646,11 @@ const FIXTURES = [
|
|||
},
|
||||
sender: SENDER,
|
||||
}),
|
||||
result: _("message.alias.main", SENDER, undefined, "#test:example.com"),
|
||||
result: l10n.formatValueSync("message-alias-main", {
|
||||
user: SENDER,
|
||||
oldAddress: "",
|
||||
newAddress: "#test:example.com",
|
||||
}),
|
||||
name: "Room alias added",
|
||||
},
|
||||
{
|
||||
|
@ -634,12 +664,11 @@ const FIXTURES = [
|
|||
},
|
||||
sender: SENDER,
|
||||
}),
|
||||
result: _(
|
||||
"message.alias.main",
|
||||
SENDER,
|
||||
"#old:example.com",
|
||||
"#test:example.com"
|
||||
),
|
||||
result: l10n.formatValueSync("message-alias-main", {
|
||||
user: SENDER,
|
||||
oldAddress: "#old:example.com",
|
||||
newAddress: "#test:example.com",
|
||||
}),
|
||||
name: "Room alias changed",
|
||||
},
|
||||
{
|
||||
|
@ -654,7 +683,10 @@ const FIXTURES = [
|
|||
},
|
||||
sender: SENDER,
|
||||
}),
|
||||
result: _("message.alias.added", SENDER, "#foo:example.com"),
|
||||
result: l10n.formatValueSync("message-alias-added", {
|
||||
user: SENDER,
|
||||
addresses: "#foo:example.com",
|
||||
}),
|
||||
name: "Room alt alias added",
|
||||
},
|
||||
{
|
||||
|
@ -669,7 +701,10 @@ const FIXTURES = [
|
|||
},
|
||||
sender: SENDER,
|
||||
}),
|
||||
result: _("message.alias.removed", SENDER, "#foo:example.com"),
|
||||
result: l10n.formatValueSync("message-alias-removed", {
|
||||
user: SENDER,
|
||||
addresses: "#foo:example.com",
|
||||
}),
|
||||
name: "Room alt alias removed",
|
||||
},
|
||||
{
|
||||
|
@ -685,7 +720,10 @@ const FIXTURES = [
|
|||
},
|
||||
sender: SENDER,
|
||||
}),
|
||||
result: _("message.alias.removed", SENDER, "#foo:example.com"),
|
||||
result: l10n.formatValueSync("message-alias-removed", {
|
||||
user: SENDER,
|
||||
addresses: "#foo:example.com",
|
||||
}),
|
||||
name: "Room alt alias removed with multiple alts",
|
||||
},
|
||||
{
|
||||
|
@ -701,7 +739,10 @@ const FIXTURES = [
|
|||
},
|
||||
sender: SENDER,
|
||||
}),
|
||||
result: _("message.alias.added", SENDER, "#foo:example.com"),
|
||||
result: l10n.formatValueSync("message-alias-added", {
|
||||
user: SENDER,
|
||||
addresses: "#foo:example.com",
|
||||
}),
|
||||
name: "Room alt alias added with multiple alts",
|
||||
},
|
||||
{
|
||||
|
@ -721,11 +762,10 @@ const FIXTURES = [
|
|||
},
|
||||
sender: SENDER,
|
||||
}),
|
||||
result: _(
|
||||
"message.alias.added",
|
||||
SENDER,
|
||||
"#foo:example.com, #baz:example.com"
|
||||
),
|
||||
result: l10n.formatValueSync("message-alias-added", {
|
||||
user: SENDER,
|
||||
addresses: "#foo:example.com, #baz:example.com",
|
||||
}),
|
||||
name: "Multiple room alt aliases added with multiple alts",
|
||||
},
|
||||
{
|
||||
|
@ -741,12 +781,11 @@ const FIXTURES = [
|
|||
},
|
||||
sender: SENDER,
|
||||
}),
|
||||
result: _(
|
||||
"message.alias.removedAndAdded",
|
||||
SENDER,
|
||||
"#baz:example.com",
|
||||
"#foo:example.com"
|
||||
),
|
||||
result: l10n.formatValueSync("message-alias-removed-and-added", {
|
||||
user: SENDER,
|
||||
removedAddresses: "#baz:example.com",
|
||||
addedAddresses: "#foo:example.com",
|
||||
}),
|
||||
name: "Room alias added and removed",
|
||||
},
|
||||
{
|
||||
|
@ -773,7 +812,10 @@ const FIXTURES = [
|
|||
},
|
||||
sender: SENDER,
|
||||
}),
|
||||
result: _("message.verification.request2", SENDER, "@foo:example.com"),
|
||||
result: l10n.formatValueSync("message-verification-request2", {
|
||||
user: SENDER,
|
||||
userReceiving: "@foo:example.com",
|
||||
}),
|
||||
name: "Inline key verification request",
|
||||
},
|
||||
{
|
||||
|
@ -784,7 +826,10 @@ const FIXTURES = [
|
|||
},
|
||||
sender: SENDER,
|
||||
}),
|
||||
result: _("message.verification.request2", SENDER, "@foo:example.com"),
|
||||
result: l10n.formatValueSync("message-verification-request2", {
|
||||
user: SENDER,
|
||||
userReceiving: "@foo:example.com",
|
||||
}),
|
||||
name: "Key verification request",
|
||||
},
|
||||
{
|
||||
|
@ -795,7 +840,10 @@ const FIXTURES = [
|
|||
},
|
||||
sender: SENDER,
|
||||
}),
|
||||
result: _("message.verification.cancel2", SENDER, "Lorem ipsum"),
|
||||
result: l10n.formatValueSync("message-verification-cancel2", {
|
||||
user: SENDER,
|
||||
reason: "Lorem ipsum",
|
||||
}),
|
||||
name: "Key verification cancelled",
|
||||
},
|
||||
{
|
||||
|
@ -803,7 +851,7 @@ const FIXTURES = [
|
|||
type: MatrixSDK.EventType.KeyVerificationDone,
|
||||
sender: SENDER,
|
||||
}),
|
||||
result: _("message.verification.done"),
|
||||
result: l10n.formatValueSync("message-verification-done"),
|
||||
name: "Key verification done",
|
||||
},
|
||||
{
|
||||
|
@ -813,14 +861,14 @@ const FIXTURES = [
|
|||
msgtype: "m.bad.encrypted",
|
||||
},
|
||||
}),
|
||||
result: _("message.decryptionError"),
|
||||
result: l10n.formatValueSync("message-decryption-error"),
|
||||
name: "Decryption error",
|
||||
},
|
||||
{
|
||||
event: makeEvent({
|
||||
type: MatrixSDK.EventType.RoomEncryption,
|
||||
}),
|
||||
result: _("message.encryptionStart"),
|
||||
result: l10n.formatValueSync("message-encryption-start"),
|
||||
name: "Encryption start",
|
||||
},
|
||||
];
|
||||
|
|
|
@ -2,13 +2,14 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import { l10nHelper } from "resource:///modules/imXPCOMUtils.sys.mjs";
|
||||
import { GenericProtocolPrototype } from "resource:///modules/jsProtoHelper.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineLazyGetter(lazy, "_", () =>
|
||||
l10nHelper("chrome://chat/locale/xmpp.properties")
|
||||
ChromeUtils.defineLazyGetter(
|
||||
lazy,
|
||||
"l10n",
|
||||
() => new Localization(["chat/xmpp.ftl"], true)
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
XMPPAccountPrototype: "resource:///modules/xmpp-base.sys.mjs",
|
||||
|
@ -41,7 +42,7 @@ ChromeUtils.defineLazyGetter(lazy, "OdnoklassnikiAccount", () => {
|
|||
// We can't use this.onError because this._connection doesn't exist.
|
||||
this.reportDisconnecting(
|
||||
Ci.prplIAccount.ERROR_INVALID_USERNAME,
|
||||
lazy._("connection.error.invalidUsername")
|
||||
lazy.l10n.formatValueSync("connection-error-invalid-username")
|
||||
);
|
||||
this.reportDisconnected();
|
||||
return;
|
||||
|
@ -68,13 +69,13 @@ OdnoklassnikiProtocol.prototype = {
|
|||
return "odnoklassniki";
|
||||
},
|
||||
get name() {
|
||||
return lazy._("odnoklassniki.protocolName");
|
||||
return lazy.l10n.formatValueSync("odnoklassniki-protocol-name");
|
||||
},
|
||||
get iconBaseURI() {
|
||||
return "chrome://prpl-odnoklassniki/skin/";
|
||||
},
|
||||
get usernameEmptyText() {
|
||||
return lazy._("odnoklassniki.usernameHint");
|
||||
return lazy.l10n.formatValueSync("odnoklassniki-username-hint");
|
||||
},
|
||||
getAccount(aImAccount) {
|
||||
return new lazy.OdnoklassnikiAccount(this, aImAccount);
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import { l10nHelper } from "resource:///modules/imXPCOMUtils.sys.mjs";
|
||||
import {
|
||||
GenericAccountPrototype,
|
||||
GenericProtocolPrototype,
|
||||
|
@ -10,8 +9,10 @@ import {
|
|||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineLazyGetter(lazy, "_", () =>
|
||||
l10nHelper("chrome://chat/locale/twitter.properties")
|
||||
ChromeUtils.defineLazyGetter(
|
||||
lazy,
|
||||
"l10n",
|
||||
() => new Localization(["chat/twitter.ftl"], true)
|
||||
);
|
||||
|
||||
function Account(aProtocol, aImAccount) {
|
||||
|
@ -27,7 +28,7 @@ Account.prototype = {
|
|||
);
|
||||
this.reportDisconnecting(
|
||||
Ci.prplIAccount.ERROR_OTHER_ERROR,
|
||||
lazy._("twitter.disabled")
|
||||
lazy.l10n.formatValueSync("twitter-disabled")
|
||||
);
|
||||
this.reportDisconnected();
|
||||
},
|
||||
|
@ -47,7 +48,7 @@ TwitterProtocol.prototype = {
|
|||
return "twitter";
|
||||
},
|
||||
get name() {
|
||||
return lazy._("twitter.protocolName");
|
||||
return lazy.l10n.formatValueSync("twitter-protocol-name");
|
||||
},
|
||||
get iconBaseURI() {
|
||||
return "chrome://prpl-twitter/skin/";
|
||||
|
|
|
@ -10,7 +10,6 @@ import {
|
|||
nsSimpleEnumerator,
|
||||
EmptyEnumerator,
|
||||
ClassInfo,
|
||||
l10nHelper,
|
||||
} from "resource:///modules/imXPCOMUtils.sys.mjs";
|
||||
import {
|
||||
GenericAccountPrototype,
|
||||
|
@ -40,8 +39,10 @@ XPCOMUtils.defineLazyServiceGetter(
|
|||
"imgITools"
|
||||
);
|
||||
|
||||
ChromeUtils.defineLazyGetter(lazy, "_", () =>
|
||||
l10nHelper("chrome://chat/locale/xmpp.properties")
|
||||
ChromeUtils.defineLazyGetter(
|
||||
lazy,
|
||||
"l10n",
|
||||
() => new Localization(["chat/xmpp.ftl"], true)
|
||||
);
|
||||
|
||||
ChromeUtils.defineLazyGetter(lazy, "TXTToHTML", function () {
|
||||
|
@ -254,8 +255,8 @@ export var XMPPMUCConversationPrototype = {
|
|||
{ type: "groupchat" },
|
||||
subject
|
||||
);
|
||||
const notAuthorized = lazy._(
|
||||
"conversation.error.changeTopicFailedNotAuthorized"
|
||||
const notAuthorized = lazy.l10n.formatValueSync(
|
||||
"conversation-error-change-topic-failed-not-authorized"
|
||||
);
|
||||
this._account.sendStanza(
|
||||
s,
|
||||
|
@ -283,10 +284,9 @@ export var XMPPMUCConversationPrototype = {
|
|||
}
|
||||
// XEP-0045 (7.4): Sending a message to all occupants in a room.
|
||||
const s = Stanza.message(this.name, aMsg, null, { type: "groupchat" });
|
||||
const notInRoom = lazy._(
|
||||
"conversation.error.sendFailedAsNotInRoom",
|
||||
this.name,
|
||||
aMsg
|
||||
const notInRoom = lazy.l10n.formatValueSync(
|
||||
"conversation-error-send-failed-as-not-inroom",
|
||||
{ mucName: this.name, message: aMsg }
|
||||
);
|
||||
this._account.sendStanza(
|
||||
s,
|
||||
|
@ -319,23 +319,33 @@ export var XMPPMUCConversationPrototype = {
|
|||
case "not-authorized":
|
||||
case "registration-required":
|
||||
// XEP-0045 (7.2.7): Members-Only Rooms.
|
||||
message = lazy._("conversation.error.joinFailedNotAuthorized");
|
||||
message = lazy.l10n.formatValueSync(
|
||||
"conversation-error-join-failed-not-authorized"
|
||||
);
|
||||
break;
|
||||
case "not-allowed":
|
||||
message = lazy._("conversation.error.creationFailedNotAllowed");
|
||||
message = lazy.l10n.formatValueSync(
|
||||
"conversation-error-creation-failed-not-allowed"
|
||||
);
|
||||
break;
|
||||
case "remote-server-not-found":
|
||||
message = lazy._(
|
||||
"conversation.error.joinFailedRemoteServerNotFound",
|
||||
this.name
|
||||
message = lazy.l10n.formatValueSync(
|
||||
"conversation-error-join-failed-remote-server-not-found",
|
||||
{ mucName: this.name }
|
||||
);
|
||||
break;
|
||||
case "forbidden":
|
||||
// XEP-0045 (7.2.8): Banned users.
|
||||
message = lazy._("conversation.error.joinForbidden", this.name);
|
||||
message = lazy.l10n.formatValueSync(
|
||||
"conversation-error-join-forbidden",
|
||||
{ mucName: this.name }
|
||||
);
|
||||
break;
|
||||
default:
|
||||
message = lazy._("conversation.error.joinFailed", this.name);
|
||||
message = lazy.l10n.formatValueSync(
|
||||
"conversation-error-join-failed",
|
||||
{ mucName: this.name }
|
||||
);
|
||||
this.ERROR("Failed to join MUC: " + aStanza.convertToString());
|
||||
break;
|
||||
}
|
||||
|
@ -405,14 +415,14 @@ export var XMPPMUCConversationPrototype = {
|
|||
// Who caused the participant to leave the room.
|
||||
const actor = item.getElement(["actor"]);
|
||||
const actorNick = actor ? actor.attributes.nick : "";
|
||||
const isActor = actorNick ? ".actor" : "";
|
||||
const isActor = actorNick ? "-actor" : "";
|
||||
|
||||
// Why the participant left.
|
||||
let reasonNode = item.getElement(["reason"]);
|
||||
let reason = reasonNode ? reasonNode.innerText : "";
|
||||
let isReason = reason ? ".reason" : "";
|
||||
let isReason = reason ? "-reason" : "";
|
||||
|
||||
const isYou = nick == this.nick ? ".you" : "";
|
||||
const isYou = nick == this.nick ? "-you" : "";
|
||||
const affectedNick = isYou ? "" : nick;
|
||||
if (isYou) {
|
||||
this.left = true;
|
||||
|
@ -421,38 +431,46 @@ export var XMPPMUCConversationPrototype = {
|
|||
let message;
|
||||
if (codes.includes("301")) {
|
||||
// XEP-0045 (9.1): Banning a User.
|
||||
message = "conversation.message.banned";
|
||||
message = "conversation-message-banned";
|
||||
} else if (codes.includes("307")) {
|
||||
// XEP-0045 (8.2): Kicking an Occupant.
|
||||
message = "conversation.message.kicked";
|
||||
message = "conversation-message-kicked";
|
||||
} else if (codes.includes("322") || codes.includes("321")) {
|
||||
// XEP-0045: Inform user that he or she is being removed from the
|
||||
// room because the room has been changed to members-only and the
|
||||
// user is not a member.
|
||||
message = "conversation.message.removedNonMember";
|
||||
message = "conversation-message-removed-non-member";
|
||||
} else if (codes.includes("332")) {
|
||||
// XEP-0045: Inform user that he or she is being removed from the
|
||||
// room because the MUC service is being shut down.
|
||||
message = "conversation.message.mucShutdown";
|
||||
message = "conversation-message-muc-shutdown";
|
||||
|
||||
// The reason here just duplicates what's in the system message.
|
||||
reason = isReason = "";
|
||||
} else {
|
||||
// XEP-0045 (7.14): Received when the user parts a room.
|
||||
message = "conversation.message.parted";
|
||||
message = "conversation-message-parted";
|
||||
|
||||
// The reason is in a status element in this case.
|
||||
reasonNode = aStanza.getElement(["status"]);
|
||||
reason = reasonNode ? reasonNode.innerText : "";
|
||||
isReason = reason ? ".reason" : "";
|
||||
isReason = reason ? "-reason" : "";
|
||||
}
|
||||
|
||||
if (message) {
|
||||
const messageID = message + isYou + isActor + isReason;
|
||||
const params = [actorNick, affectedNick, reason].filter(s => s);
|
||||
this.writeMessage(this.name, lazy._(messageID, ...params), {
|
||||
system: true,
|
||||
});
|
||||
const messageID = `${message}${isYou}${isActor}${isReason}`;
|
||||
const paramObject = {
|
||||
actorNick,
|
||||
affectedNick,
|
||||
reason,
|
||||
};
|
||||
this.writeMessage(
|
||||
this.name,
|
||||
lazy.l10n.formatValueSync(messageID, paramObject),
|
||||
{
|
||||
system: true,
|
||||
}
|
||||
);
|
||||
}
|
||||
} else {
|
||||
this.WARN("Unhandled type==unavailable MUC presence stanza.");
|
||||
|
@ -510,15 +528,21 @@ export var XMPPMUCConversationPrototype = {
|
|||
if (this.nick != nick && !this.joining) {
|
||||
this.writeMessage(
|
||||
this.name,
|
||||
lazy._("conversation.message.join", nick),
|
||||
lazy.l10n.formatValueSync("conversation-message-join", {
|
||||
participant: nick,
|
||||
}),
|
||||
{
|
||||
system: true,
|
||||
}
|
||||
);
|
||||
} else if (this.nick == nick && this._rejoined) {
|
||||
this.writeMessage(this.name, lazy._("conversation.message.rejoined"), {
|
||||
system: true,
|
||||
});
|
||||
this.writeMessage(
|
||||
this.name,
|
||||
lazy.l10n.formatValueSync("conversation-message-rejoined"),
|
||||
{
|
||||
system: true,
|
||||
}
|
||||
);
|
||||
this._rejoined = false;
|
||||
}
|
||||
} else {
|
||||
|
@ -536,7 +560,9 @@ export var XMPPMUCConversationPrototype = {
|
|||
flags.system = true;
|
||||
from = this.name;
|
||||
} else if (aStanza.attributes.type == "error") {
|
||||
aMsg = lazy._("conversation.error.notDelivered", aMsg);
|
||||
aMsg = lazy.l10n.formatValueSync("conversation-error-not-delivered", {
|
||||
message: aMsg,
|
||||
});
|
||||
flags.system = true;
|
||||
flags.error = true;
|
||||
} else if (from == this._nick) {
|
||||
|
@ -588,12 +614,19 @@ export var XMPPMUCConversationPrototype = {
|
|||
s,
|
||||
this._account.handleErrors(
|
||||
{
|
||||
forbidden: lazy._("conversation.error.inviteFailedForbidden"),
|
||||
forbidden: lazy.l10n.formatValueSync(
|
||||
"conversation-error-invite-failed-forbidden"
|
||||
),
|
||||
// ejabberd uses error not-allowed to indicate that this account does not
|
||||
// have the required privileges to invite users instead of forbidden error,
|
||||
// and this is not mentioned in the spec (XEP-0045).
|
||||
notAllowed: lazy._("conversation.error.inviteFailedForbidden"),
|
||||
itemNotFound: lazy._("conversation.error.failedJIDNotFound", aJID),
|
||||
notAllowed: lazy.l10n.formatValueSync(
|
||||
"conversation-error-invite-failed-forbidden"
|
||||
),
|
||||
itemNotFound: lazy.l10n.formatValueSync(
|
||||
"conversation-error-failed-jid-not-found",
|
||||
{ jabberIdentifier: aJID }
|
||||
),
|
||||
},
|
||||
this
|
||||
)
|
||||
|
@ -607,7 +640,9 @@ export var XMPPMUCConversationPrototype = {
|
|||
if (!participant) {
|
||||
this.writeMessage(
|
||||
this.name,
|
||||
lazy._("conversation.error.nickNotInRoom", aNickName),
|
||||
lazy.l10n.formatValueSync("conversation-error-nick-not-in-room", {
|
||||
nick: aNickName,
|
||||
}),
|
||||
{ system: true }
|
||||
);
|
||||
return;
|
||||
|
@ -615,7 +650,9 @@ export var XMPPMUCConversationPrototype = {
|
|||
if (!participant.accountJid) {
|
||||
this.writeMessage(
|
||||
this.name,
|
||||
lazy._("conversation.error.banCommandAnonymousRoom"),
|
||||
lazy.l10n.formatValueSync(
|
||||
"conversation-error-ban-command-anonymous-room"
|
||||
),
|
||||
{ system: true }
|
||||
);
|
||||
return;
|
||||
|
@ -660,8 +697,12 @@ export var XMPPMUCConversationPrototype = {
|
|||
_banKickHandler(aStanza) {
|
||||
return this._account._handleResult(
|
||||
{
|
||||
notAllowed: lazy._("conversation.error.banKickCommandNotAllowed"),
|
||||
conflict: lazy._("conversation.error.banKickCommandConflict"),
|
||||
notAllowed: lazy.l10n.formatValueSync(
|
||||
"conversation-error-ban-kick-command-not-allowed"
|
||||
),
|
||||
conflict: lazy.l10n.formatValueSync(
|
||||
"conversation-error-ban-kick-command-conflict"
|
||||
),
|
||||
},
|
||||
this
|
||||
)(aStanza);
|
||||
|
@ -678,14 +719,14 @@ export var XMPPMUCConversationPrototype = {
|
|||
// XEP-0045 (7.6): Changing Nickname (example 53).
|
||||
// TODO: We should discover if the user has a reserved nickname (maybe
|
||||
// before joining a room), cf. XEP-0045 (7.12).
|
||||
notAcceptable: lazy._(
|
||||
"conversation.error.changeNickFailedNotAcceptable",
|
||||
aNewNick
|
||||
notAcceptable: lazy.l10n.formatValueSync(
|
||||
"conversation-error-change-nick-failed-not-acceptable",
|
||||
{ nick: aNewNick }
|
||||
),
|
||||
// XEP-0045 (7.2.9): Nickname Conflict.
|
||||
conflict: lazy._(
|
||||
"conversation.error.changeNickFailedConflict",
|
||||
aNewNick
|
||||
conflict: lazy.l10n.formatValueSync(
|
||||
"conversation-error-change-nick-failed-conflict",
|
||||
{ nick: aNewNick }
|
||||
),
|
||||
},
|
||||
this
|
||||
|
@ -706,13 +747,18 @@ export var XMPPMUCConversationPrototype = {
|
|||
const reason = reasonNode ? reasonNode.innerText : "";
|
||||
let msg;
|
||||
if (reason) {
|
||||
msg = lazy._(
|
||||
"conversation.message.invitationDeclined.reason",
|
||||
invitee,
|
||||
reason
|
||||
msg = lazy.l10n.formatValueSync(
|
||||
"conversation-message-invitation-declined-reason",
|
||||
{
|
||||
invitee,
|
||||
declineReason: reason,
|
||||
}
|
||||
);
|
||||
} else {
|
||||
msg = lazy._("conversation.message.invitationDeclined", invitee);
|
||||
msg = lazy.l10n.formatValueSync(
|
||||
"conversation-message-invitation-declined",
|
||||
{ invitee }
|
||||
);
|
||||
}
|
||||
|
||||
this.writeMessage(this.name, msg, { system: true });
|
||||
|
@ -903,7 +949,9 @@ export var XMPPConversationPrototype = {
|
|||
if (
|
||||
this._account.handleErrors(
|
||||
{
|
||||
default: lazy._("conversation.error.version.unknown"),
|
||||
default: lazy.l10n.formatValueSync(
|
||||
"conversation-error-version-unknown"
|
||||
),
|
||||
},
|
||||
this
|
||||
)(aStanza)
|
||||
|
@ -931,19 +979,27 @@ export var XMPPConversationPrototype = {
|
|||
return;
|
||||
}
|
||||
|
||||
let messageID = "conversation.message.version";
|
||||
const params = [this.shortName, name.innerText, version.innerText];
|
||||
let messageID = "conversation-message-version";
|
||||
const paramObject = {
|
||||
user: this.shortName,
|
||||
clientName: name.innerText,
|
||||
clientVersion: version.innerText,
|
||||
};
|
||||
|
||||
// XEP-0092: os is OPTIONAL.
|
||||
const os = query.getElement(["os"]);
|
||||
if (os) {
|
||||
params.push(os.innerText);
|
||||
messageID += "WithOS";
|
||||
paramObject.systemResponse = os.innerText;
|
||||
messageID = `${messageID}-with-os`;
|
||||
}
|
||||
|
||||
this.writeMessage(this.name, lazy._(messageID, ...params), {
|
||||
system: true,
|
||||
});
|
||||
this.writeMessage(
|
||||
this.name,
|
||||
lazy.l10n.formatValueSync(messageID, paramObject),
|
||||
{
|
||||
system: true,
|
||||
}
|
||||
);
|
||||
});
|
||||
},
|
||||
|
||||
|
@ -970,16 +1026,20 @@ export var XMPPConversationPrototype = {
|
|||
// Failed outgoing message.
|
||||
switch (error.condition) {
|
||||
case "remote-server-not-found":
|
||||
aMsg = lazy._("conversation.error.remoteServerNotFound");
|
||||
aMsg = lazy.l10n.formatValueSync(
|
||||
"conversation-error-remote-server-not-found"
|
||||
);
|
||||
break;
|
||||
case "service-unavailable":
|
||||
aMsg = lazy._(
|
||||
"conversation.error.sendServiceUnavailable",
|
||||
this.shortName
|
||||
aMsg = lazy.l10n.formatValueSync(
|
||||
"conversation-error-send-service-unavailable",
|
||||
{ nick: this.shortName }
|
||||
);
|
||||
break;
|
||||
default:
|
||||
aMsg = lazy._("conversation.error.unknownSendError");
|
||||
aMsg = lazy.l10n.formatValueSync(
|
||||
"conversation-error-unknown-send-error"
|
||||
);
|
||||
break;
|
||||
}
|
||||
} else if (
|
||||
|
@ -990,10 +1050,12 @@ export var XMPPConversationPrototype = {
|
|||
) {
|
||||
// XEP-0045 (7.5): MUC private messages.
|
||||
// If we try to send to participant not in a room we are in.
|
||||
aMsg = lazy._(
|
||||
"conversation.error.sendFailedAsRecipientNotInRoom",
|
||||
this._targetResource,
|
||||
aMsg
|
||||
aMsg = lazy.l10n.formatValueSync(
|
||||
"conversation-error-send-failed-as-recipient-not-inroom",
|
||||
{
|
||||
jabberIdentifier: this._targetResource,
|
||||
message: aMsg,
|
||||
}
|
||||
);
|
||||
} else if (
|
||||
this._isMucParticipant &&
|
||||
|
@ -1002,13 +1064,17 @@ export var XMPPConversationPrototype = {
|
|||
) {
|
||||
// If we left a room and try to send to a participant in it or the
|
||||
// room is removed.
|
||||
aMsg = lazy._(
|
||||
"conversation.error.sendFailedAsNotInRoom",
|
||||
this._account.normalize(from),
|
||||
aMsg
|
||||
aMsg = lazy.l10n.formatValueSync(
|
||||
"conversation-error-send-failed-as-not-inroom",
|
||||
{
|
||||
mucName: this._account.normalize(from),
|
||||
message: aMsg,
|
||||
}
|
||||
);
|
||||
} else {
|
||||
aMsg = lazy._("conversation.error.notDelivered", aMsg);
|
||||
aMsg = lazy.l10n.formatValueSync("conversation-error-not-delivered", {
|
||||
message: aMsg,
|
||||
});
|
||||
}
|
||||
flags.system = true;
|
||||
flags.error = true;
|
||||
|
@ -1081,8 +1147,10 @@ export var XMPPAccountBuddyPrototype = {
|
|||
statusString += " - " + status.statusText;
|
||||
}
|
||||
const label = r
|
||||
? lazy._("tooltip.status", r)
|
||||
: lazy._("tooltip.statusNoResource");
|
||||
? lazy.l10n.formatValueSync("tooltip-status", {
|
||||
resourceIdentifier: r,
|
||||
})
|
||||
: lazy.l10n.formatValueSync("tooltip-status-no-resource");
|
||||
tooltipInfo.push(new TooltipInfo(label, statusString));
|
||||
}
|
||||
}
|
||||
|
@ -1090,7 +1158,10 @@ export var XMPPAccountBuddyPrototype = {
|
|||
// The subscription value is interesting to display only in unusual cases.
|
||||
if (this.subscription != "both") {
|
||||
tooltipInfo.push(
|
||||
new TooltipInfo(lazy._("tooltip.subscription"), this.subscription)
|
||||
new TooltipInfo(
|
||||
lazy.l10n.formatValueSync("tooltip-subscription"),
|
||||
this.subscription
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -1445,25 +1516,25 @@ export var XMPPAccountPrototype = {
|
|||
chatRoomFields: {
|
||||
room: {
|
||||
get label() {
|
||||
return lazy._("chatRoomField.room");
|
||||
return lazy.l10n.formatValueSync("chat-room-field-room");
|
||||
},
|
||||
required: true,
|
||||
},
|
||||
server: {
|
||||
get label() {
|
||||
return lazy._("chatRoomField.server");
|
||||
return lazy.l10n.formatValueSync("chat-room-field-server");
|
||||
},
|
||||
required: true,
|
||||
},
|
||||
nick: {
|
||||
get label() {
|
||||
return lazy._("chatRoomField.nick");
|
||||
return lazy.l10n.formatValueSync("chat-room-field-nick");
|
||||
},
|
||||
required: true,
|
||||
},
|
||||
password: {
|
||||
get label() {
|
||||
return lazy._("chatRoomField.password");
|
||||
return lazy.l10n.formatValueSync("chat-room-field-password");
|
||||
},
|
||||
isPassword: true,
|
||||
},
|
||||
|
@ -1772,24 +1843,27 @@ export var XMPPAccountPrototype = {
|
|||
}
|
||||
|
||||
// vCard fields we want to display in the tooltip.
|
||||
const kTooltipFields = [
|
||||
"userName",
|
||||
"fullName",
|
||||
"nickname",
|
||||
"title",
|
||||
"organization",
|
||||
"email",
|
||||
"birthday",
|
||||
"locality",
|
||||
"country",
|
||||
"telephone",
|
||||
];
|
||||
const kTooltipFields = {
|
||||
userName: "tooltip-user-name",
|
||||
fullName: "tooltip-full-name",
|
||||
nickname: "tooltip-nickname",
|
||||
title: "tooltip-title",
|
||||
organization: "tooltip-organization",
|
||||
email: "tooltip-email",
|
||||
birthday: "tooltip-birthday",
|
||||
locality: "tooltip-locality",
|
||||
country: "tooltip-country",
|
||||
telephone: "tooltip-telephone",
|
||||
};
|
||||
|
||||
const tooltipInfo = [];
|
||||
for (const field of kTooltipFields) {
|
||||
for (const [field, stringKey] of Object.entries(kTooltipFields)) {
|
||||
if (vCardInfo.hasOwnProperty(field)) {
|
||||
tooltipInfo.push(
|
||||
new TooltipInfo(lazy._("tooltip." + field), vCardInfo[field])
|
||||
new TooltipInfo(
|
||||
lazy.l10n.formatValueSync(stringKey),
|
||||
vCardInfo[field]
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -2033,7 +2107,9 @@ export var XMPPAccountPrototype = {
|
|||
onConnection() {
|
||||
// Request the roster. The account will be marked as connected when this is
|
||||
// complete.
|
||||
this.reportConnecting(lazy._("connection.downloadingRoster"));
|
||||
this.reportConnecting(
|
||||
lazy.l10n.formatValueSync("connection-downloading-roster")
|
||||
);
|
||||
const s = Stanza.iq(
|
||||
"get",
|
||||
null,
|
||||
|
@ -2527,21 +2603,21 @@ export var XMPPAccountPrototype = {
|
|||
const invitation = this.parseInvitation(aStanza);
|
||||
if (invitation) {
|
||||
let messageID;
|
||||
const fluentParams = {
|
||||
inviter: invitation.from,
|
||||
room: invitation.mucJid,
|
||||
};
|
||||
if (invitation.reason) {
|
||||
messageID = "conversation.muc.invitationWithReason2";
|
||||
messageID = "conversation-muc-invitation-with-reason2";
|
||||
fluentParams.reason = invitation.reason;
|
||||
} else {
|
||||
messageID = "conversation.muc.invitationWithoutReason";
|
||||
messageID = "conversation-muc-invitation-without-reason";
|
||||
}
|
||||
if (invitation.password) {
|
||||
messageID += ".password";
|
||||
messageID += "-password";
|
||||
fluentParams.password = invitation.password;
|
||||
}
|
||||
const params = [
|
||||
invitation.from,
|
||||
invitation.mucJid,
|
||||
invitation.password,
|
||||
invitation.reason,
|
||||
].filter(s => s);
|
||||
const message = lazy._(messageID, ...params);
|
||||
const message = lazy.l10n.formatValueSync(messageID, fluentParams);
|
||||
|
||||
this.addChatRequest(
|
||||
invitation.mucJid,
|
||||
|
|
|
@ -2,13 +2,14 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import { l10nHelper } from "resource:///modules/imXPCOMUtils.sys.mjs";
|
||||
import { IMServices } from "resource:///modules/IMServices.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineLazyGetter(lazy, "_", () =>
|
||||
l10nHelper("chrome://chat/locale/xmpp.properties")
|
||||
ChromeUtils.defineLazyGetter(
|
||||
lazy,
|
||||
"l10n",
|
||||
() => new Localization(["chat/xmpp.ftl"], true)
|
||||
);
|
||||
|
||||
// Get conversation object.
|
||||
|
@ -26,7 +27,9 @@ function getMUC(aConv) {
|
|||
if (conv.left) {
|
||||
conv.writeMessage(
|
||||
conv.name,
|
||||
lazy._("conversation.error.commandFailedNotInRoom"),
|
||||
lazy.l10n.formatValueSync(
|
||||
"conversation-error-command-failed-not-in-room"
|
||||
),
|
||||
{ system: true }
|
||||
);
|
||||
return null;
|
||||
|
@ -77,7 +80,9 @@ function splitByNick(aString, aConv) {
|
|||
const expectedNickName = offset != -1 ? params.slice(0, offset) : params;
|
||||
aConv.writeMessage(
|
||||
aConv.name,
|
||||
lazy._("conversation.error.nickNotInRoom", expectedNickName),
|
||||
lazy.l10n.formatValueSync("conversation-error-nick-not-in-room", {
|
||||
nick: expectedNickName,
|
||||
}),
|
||||
{ system: true }
|
||||
);
|
||||
return [];
|
||||
|
@ -108,7 +113,9 @@ function invite(aMsg, aConv) {
|
|||
if (!jid) {
|
||||
aConv.writeMessage(
|
||||
aConv.name,
|
||||
lazy._("conversation.error.invalidJID", params[0]),
|
||||
lazy.l10n.formatValueSync("conversation-error-invalid-jid", {
|
||||
jabberIdentifier: params[0],
|
||||
}),
|
||||
{ system: true }
|
||||
);
|
||||
return true;
|
||||
|
@ -122,7 +129,9 @@ export var commands = [
|
|||
{
|
||||
name: "join",
|
||||
get helpString() {
|
||||
return lazy._("command.join3", "join");
|
||||
return lazy.l10n.formatValueSync("command-join3", {
|
||||
commandName: "join",
|
||||
});
|
||||
},
|
||||
run(aMsg, aConv, aReturnedConv) {
|
||||
const account = getAccount(aConv);
|
||||
|
@ -160,7 +169,9 @@ export var commands = [
|
|||
{
|
||||
name: "part",
|
||||
get helpString() {
|
||||
return lazy._("command.part2", "part");
|
||||
return lazy.l10n.formatValueSync("command-part2", {
|
||||
commandName: "part",
|
||||
});
|
||||
},
|
||||
usageContext: IMServices.cmd.COMMAND_CONTEXT.CHAT,
|
||||
run(aMsg, aConv) {
|
||||
|
@ -174,7 +185,9 @@ export var commands = [
|
|||
{
|
||||
name: "topic",
|
||||
get helpString() {
|
||||
return lazy._("command.topic", "topic");
|
||||
return lazy.l10n.formatValueSync("command-topic", {
|
||||
commandName: "topic",
|
||||
});
|
||||
},
|
||||
usageContext: IMServices.cmd.COMMAND_CONTEXT.CHAT,
|
||||
run(aMsg, aConv) {
|
||||
|
@ -189,7 +202,7 @@ export var commands = [
|
|||
{
|
||||
name: "ban",
|
||||
get helpString() {
|
||||
return lazy._("command.ban", "ban");
|
||||
return lazy.l10n.formatValueSync("command-ban", { commandName: "ban" });
|
||||
},
|
||||
usageContext: IMServices.cmd.COMMAND_CONTEXT.CHAT,
|
||||
run(aMsg, aConv) {
|
||||
|
@ -208,7 +221,7 @@ export var commands = [
|
|||
{
|
||||
name: "kick",
|
||||
get helpString() {
|
||||
return lazy._("command.kick", "kick");
|
||||
return lazy.l10n.formatValueSync("command-kick", { commandName: "kick" });
|
||||
},
|
||||
usageContext: IMServices.cmd.COMMAND_CONTEXT.CHAT,
|
||||
run(aMsg, aConv) {
|
||||
|
@ -228,7 +241,9 @@ export var commands = [
|
|||
{
|
||||
name: "invite",
|
||||
get helpString() {
|
||||
return lazy._("command.invite", "invite");
|
||||
return lazy.l10n.formatValueSync("command-invite", {
|
||||
commandName: "invite",
|
||||
});
|
||||
},
|
||||
usageContext: IMServices.cmd.COMMAND_CONTEXT.CHAT,
|
||||
run(aMsg, aConv) {
|
||||
|
@ -243,7 +258,9 @@ export var commands = [
|
|||
{
|
||||
name: "inviteto",
|
||||
get helpString() {
|
||||
return lazy._("command.inviteto", "inviteto");
|
||||
return lazy.l10n.formatValueSync("command-inviteto", {
|
||||
commandName: "inviteto",
|
||||
});
|
||||
},
|
||||
usageContext: IMServices.cmd.COMMAND_CONTEXT.IM,
|
||||
run: (aMsg, aConv) => invite(aMsg, getConv(aConv)),
|
||||
|
@ -251,7 +268,7 @@ export var commands = [
|
|||
{
|
||||
name: "me",
|
||||
get helpString() {
|
||||
return lazy._("command.me", "me");
|
||||
return lazy.l10n.formatValueSync("command-me", { commandName: "me" });
|
||||
},
|
||||
usageContext: IMServices.cmd.COMMAND_CONTEXT.CHAT,
|
||||
run(aMsg, aConv) {
|
||||
|
@ -269,7 +286,7 @@ export var commands = [
|
|||
{
|
||||
name: "nick",
|
||||
get helpString() {
|
||||
return lazy._("command.nick", "nick");
|
||||
return lazy.l10n.formatValueSync("command-nick", { commandName: "nick" });
|
||||
},
|
||||
usageContext: IMServices.cmd.COMMAND_CONTEXT.CHAT,
|
||||
run(aMsg, aConv) {
|
||||
|
@ -288,7 +305,7 @@ export var commands = [
|
|||
{
|
||||
name: "msg",
|
||||
get helpString() {
|
||||
return lazy._("command.msg", "msg");
|
||||
return lazy.l10n.formatValueSync("command-msg", { commandName: "msg" });
|
||||
},
|
||||
usageContext: IMServices.cmd.COMMAND_CONTEXT.CHAT,
|
||||
run(aMsg, aConv, aReturnedConv) {
|
||||
|
@ -321,7 +338,9 @@ export var commands = [
|
|||
{
|
||||
name: "version",
|
||||
get helpString() {
|
||||
return lazy._("command.version", "version");
|
||||
return lazy.l10n.formatValueSync("command-version", {
|
||||
commandName: "version",
|
||||
});
|
||||
},
|
||||
usageContext: IMServices.cmd.COMMAND_CONTEXT.IM,
|
||||
run(aMsg, aConv) {
|
||||
|
@ -334,7 +353,10 @@ export var commands = [
|
|||
if (!conv._targetResource) {
|
||||
conv.writeMessage(
|
||||
conv.name,
|
||||
lazy._("conversation.error.resourceNotAvailable", conv.shortName),
|
||||
lazy.l10n.formatValueSync(
|
||||
"conversation-error-resource-not-available",
|
||||
{ recipient: conv.shortName }
|
||||
),
|
||||
{
|
||||
system: true,
|
||||
}
|
||||
|
|
|
@ -3,17 +3,17 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import { DNS } from "resource:///modules/DNS.sys.mjs";
|
||||
import { l10nHelper } from "resource:///modules/imXPCOMUtils.sys.mjs";
|
||||
import { Socket } from "resource:///modules/socket.sys.mjs";
|
||||
import { Stanza, XMPPParser } from "resource:///modules/xmpp-xml.sys.mjs";
|
||||
import { XMPPAuthMechanisms } from "resource:///modules/xmpp-authmechs.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineLazyGetter(lazy, "_", () =>
|
||||
l10nHelper("chrome://chat/locale/xmpp.properties")
|
||||
ChromeUtils.defineLazyGetter(
|
||||
lazy,
|
||||
"l10n",
|
||||
() => new Localization(["chat/xmpp.ftl"], true)
|
||||
);
|
||||
|
||||
export function XMPPSession(
|
||||
aHost,
|
||||
aPort,
|
||||
|
@ -35,7 +35,7 @@ export function XMPPSession(
|
|||
if (!aJID.node) {
|
||||
aAccount.reportDisconnecting(
|
||||
Ci.prplIAccount.ERROR_INVALID_USERNAME,
|
||||
lazy._("connection.error.invalidUsername")
|
||||
lazy.l10n.formatValueSync("connection-error-invalid-username")
|
||||
);
|
||||
aAccount.reportDisconnected();
|
||||
return;
|
||||
|
@ -62,7 +62,9 @@ export function XMPPSession(
|
|||
}
|
||||
|
||||
// RFC 6120 (Section 3.2.1): SRV lookup.
|
||||
this._account.reportConnecting(lazy._("connection.srvLookup"));
|
||||
this._account.reportConnecting(
|
||||
lazy.l10n.formatValueSync("connection-srv-lookup")
|
||||
);
|
||||
DNS.srv("_xmpp-client._tcp." + this._host)
|
||||
.then(aResult => this._handleSrvQuery(aResult))
|
||||
.catch(aError => {
|
||||
|
@ -73,7 +75,7 @@ export function XMPPSession(
|
|||
// service is decidedly not available at this domain.
|
||||
this._account.reportDisconnecting(
|
||||
Ci.prplIAccount.ERROR_OTHER_ERROR,
|
||||
lazy._("connection.error.XMPPNotSupported")
|
||||
lazy.l10n.formatValueSync("connection-error-xmpp-not-supported")
|
||||
);
|
||||
this._account.reportDisconnected();
|
||||
return;
|
||||
|
@ -283,7 +285,7 @@ XMPPSession.prototype = {
|
|||
if (!this._encrypted && this._connectionSecurity == "require_tls") {
|
||||
this.onError(
|
||||
Ci.prplIAccount.ERROR_ENCRYPTION_ERROR,
|
||||
lazy._("connection.error.startTLSNotSupported")
|
||||
lazy.l10n.formatValueSync("connection-error-start-tls-not-supported")
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
@ -332,7 +334,9 @@ XMPPSession.prototype = {
|
|||
// Clear SRV results since we have connected.
|
||||
this._srvRecords = [];
|
||||
|
||||
this._account.reportConnecting(lazy._("connection.initializingStream"));
|
||||
this._account.reportConnecting(
|
||||
lazy.l10n.formatValueSync("connection-initializing-stream")
|
||||
);
|
||||
this.startStream();
|
||||
},
|
||||
|
||||
|
@ -351,17 +355,21 @@ XMPPSession.prototype = {
|
|||
|
||||
/* The connection got disconnected without us closing it. */
|
||||
onConnectionClosed() {
|
||||
this._networkError(lazy._("connection.error.serverClosedConnection"));
|
||||
this._networkError(
|
||||
lazy.l10n.formatValueSync("connection-error-server-closed-connection")
|
||||
);
|
||||
},
|
||||
onConnectionSecurityError(aTLSError, aNSSErrorMessage) {
|
||||
const error = this._account.handleConnectionSecurityError(this);
|
||||
this.onError(error, aNSSErrorMessage);
|
||||
},
|
||||
onConnectionReset() {
|
||||
this._networkError(lazy._("connection.error.resetByPeer"));
|
||||
this._networkError(
|
||||
lazy.l10n.formatValueSync("connection-error-reset-by-peer")
|
||||
);
|
||||
},
|
||||
onConnectionTimedOut() {
|
||||
this._networkError(lazy._("connection.error.timedOut"));
|
||||
this._networkError(lazy.l10n.formatValueSync("connection-error-timed-out"));
|
||||
},
|
||||
_networkError(aMessage) {
|
||||
this.onError(Ci.prplIAccount.ERROR_NETWORK_ERROR, aMessage);
|
||||
|
@ -375,7 +383,9 @@ XMPPSession.prototype = {
|
|||
this.ERROR(aError + ": " + aException + "\n" + this._lastReceivedData);
|
||||
}
|
||||
if (aError != "parse-warning" && aError != "parsing-characters") {
|
||||
this._networkError(lazy._("connection.error.receivedUnexpectedData"));
|
||||
this._networkError(
|
||||
lazy.l10n.formatValueSync("connection-error-received-unexpected-data")
|
||||
);
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -387,14 +397,16 @@ XMPPSession.prototype = {
|
|||
this.ERROR(
|
||||
"Unexpected stanza " + aStanza.localName + ", expected 'features'"
|
||||
);
|
||||
this._networkError(lazy._("connection.error.incorrectResponse"));
|
||||
this._networkError(
|
||||
lazy.l10n.formatValueSync("connection-error-incorrect-response")
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
const starttls = aStanza.getElement(["starttls"]);
|
||||
if (starttls && this._security.includes("starttls")) {
|
||||
this._account.reportConnecting(
|
||||
lazy._("connection.initializingEncryption")
|
||||
lazy.l10n.formatValueSync("connection-initializing-encryption")
|
||||
);
|
||||
this.sendStanza(Stanza.node("starttls", Stanza.NS.tls));
|
||||
this.onXmppStanza = this.stanzaListeners.startTLS;
|
||||
|
@ -403,14 +415,14 @@ XMPPSession.prototype = {
|
|||
if (starttls && starttls.children.some(c => c.localName == "required")) {
|
||||
this.onError(
|
||||
Ci.prplIAccount.ERROR_ENCRYPTION_ERROR,
|
||||
lazy._("connection.error.startTLSRequired")
|
||||
lazy.l10n.formatValueSync("connection-error-start-tls-required")
|
||||
);
|
||||
return;
|
||||
}
|
||||
if (!starttls && this._connectionSecurity == "require_tls") {
|
||||
this.onError(
|
||||
Ci.prplIAccount.ERROR_ENCRYPTION_ERROR,
|
||||
lazy._("connection.error.startTLSNotSupported")
|
||||
lazy.l10n.formatValueSync("connection-error-start-tls-not-supported")
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
@ -421,7 +433,9 @@ XMPPSession.prototype = {
|
|||
},
|
||||
async startTLS(aStanza) {
|
||||
if (aStanza.localName != "proceed") {
|
||||
this._networkError(lazy._("connection.error.failedToStartTLS"));
|
||||
this._networkError(
|
||||
lazy.l10n.formatValueSync("connection-error-failed-to-start-tls")
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -429,7 +443,9 @@ XMPPSession.prototype = {
|
|||
await this.startTLS();
|
||||
} catch (error) {
|
||||
this.ERROR("Error starting TLS", error);
|
||||
this._networkError(lazy._("connection.error.failedToStartTLS"));
|
||||
this._networkError(
|
||||
lazy.l10n.formatValueSync("connection-error-failed-to-start-tls")
|
||||
);
|
||||
return;
|
||||
}
|
||||
this._encrypted = true;
|
||||
|
@ -441,7 +457,9 @@ XMPPSession.prototype = {
|
|||
this.ERROR(
|
||||
"Unexpected stanza " + aStanza.localName + ", expected 'features'"
|
||||
);
|
||||
this._networkError(lazy._("connection.error.incorrectResponse"));
|
||||
this._networkError(
|
||||
lazy.l10n.formatValueSync("connection-error-incorrect-response")
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -451,7 +469,9 @@ XMPPSession.prototype = {
|
|||
if (auth && auth.uri == Stanza.NS.auth_feature) {
|
||||
this.startLegacyAuth();
|
||||
} else {
|
||||
this._networkError(lazy._("connection.error.noAuthMec"));
|
||||
this._networkError(
|
||||
lazy.l10n.formatValueSync("connection-error-no-auth-mec")
|
||||
);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
@ -483,7 +503,9 @@ XMPPSession.prototype = {
|
|||
} else {
|
||||
this.onError(
|
||||
Ci.prplIAccount.ERROR_AUTHENTICATION_IMPOSSIBLE,
|
||||
lazy._("connection.error.notSendingPasswordInClear")
|
||||
lazy.l10n.formatValueSync(
|
||||
"connection-error-not-sending-password-in-clear"
|
||||
)
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
@ -491,7 +513,7 @@ XMPPSession.prototype = {
|
|||
if (!selectedMech) {
|
||||
this.onError(
|
||||
Ci.prplIAccount.ERROR_AUTHENTICATION_IMPOSSIBLE,
|
||||
lazy._("connection.error.noCompatibleAuthMec")
|
||||
lazy.l10n.formatValueSync("connection-error-no-compatible-auth-mec")
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
@ -502,22 +524,24 @@ XMPPSession.prototype = {
|
|||
);
|
||||
this._password = null;
|
||||
|
||||
this._account.reportConnecting(lazy._("connection.authenticating"));
|
||||
this._account.reportConnecting(
|
||||
lazy.l10n.formatValueSync("connection-authenticating")
|
||||
);
|
||||
this.onXmppStanza = this.stanzaListeners.authDialog.bind(this, authMec);
|
||||
this.onXmppStanza(null); // the first auth step doesn't read anything
|
||||
},
|
||||
authDialog(aAuthMec, aStanza) {
|
||||
if (aStanza && aStanza.localName == "failure") {
|
||||
let errorMsg = "authenticationFailure";
|
||||
let errorMsg = "authentication-failure";
|
||||
if (
|
||||
aStanza.getElement(["not-authorized"]) ||
|
||||
aStanza.getElement(["bad-auth"])
|
||||
) {
|
||||
errorMsg = "notAuthorized";
|
||||
errorMsg = "not-authorized";
|
||||
}
|
||||
this.onError(
|
||||
Ci.prplIAccount.ERROR_AUTHENTICATION_FAILED,
|
||||
lazy._("connection.error." + errorMsg)
|
||||
lazy.l10n.formatValueSync(`connection-error-${errorMsg}`)
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
@ -529,7 +553,7 @@ XMPPSession.prototype = {
|
|||
this.ERROR("Error in auth mechanism: " + e);
|
||||
this.onError(
|
||||
Ci.prplIAccount.ERROR_AUTHENTICATION_FAILED,
|
||||
lazy._("connection.error.authenticationFailure")
|
||||
lazy.l10n.formatValueSync("connection-error-authentication-failure")
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
@ -548,7 +572,9 @@ XMPPSession.prototype = {
|
|||
this.ERROR("Error resolving auth mechanism result: " + e);
|
||||
this.onError(
|
||||
Ci.prplIAccount.ERROR_AUTHENTICATION_FAILED,
|
||||
lazy._("connection.error.authenticationFailure")
|
||||
lazy.l10n.formatValueSync(
|
||||
"connection-error-authentication-failure"
|
||||
)
|
||||
);
|
||||
}
|
||||
);
|
||||
|
@ -561,11 +587,15 @@ XMPPSession.prototype = {
|
|||
startBind(aStanza) {
|
||||
if (!aStanza.getElement(["bind"])) {
|
||||
this.ERROR("Unexpected lack of the bind feature");
|
||||
this._networkError(lazy._("connection.error.incorrectResponse"));
|
||||
this._networkError(
|
||||
lazy.l10n.formatValueSync("connection-error-incorrect-response")
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
this._account.reportConnecting(lazy._("connection.gettingResource"));
|
||||
this._account.reportConnecting(
|
||||
lazy.l10n.formatValueSync("connection-getting-resource")
|
||||
);
|
||||
this._requestBind(this._resource);
|
||||
this.onXmppStanza = this.stanzaListeners.bindResult;
|
||||
},
|
||||
|
@ -578,12 +608,12 @@ XMPPSession.prototype = {
|
|||
// RFC 6120 (7.6.2.1): Resource Constraint.
|
||||
// The account has reached a limit on the number of simultaneous
|
||||
// connected resources allowed.
|
||||
message = "connection.error.failedMaxResourceLimit";
|
||||
message = "connection-error-failed-max-resource-limit";
|
||||
break;
|
||||
case "bad-request":
|
||||
// RFC 6120 (7.7.2.1): Bad Request.
|
||||
// The provided resourcepart cannot be processed by the server.
|
||||
message = "connection.error.failedResourceNotValid";
|
||||
message = "connection-error-failed-resource-not-valid";
|
||||
break;
|
||||
case "conflict":
|
||||
// RFC 6120 (7.7.2.2): Conflict.
|
||||
|
@ -593,15 +623,17 @@ XMPPSession.prototype = {
|
|||
return;
|
||||
default:
|
||||
this.WARN(`Unhandled bind result error ${error.condition}.`);
|
||||
message = "connection.error.failedToGetAResource";
|
||||
message = "connection-error-failed-to-get-a-resource";
|
||||
}
|
||||
this._networkError(lazy._(message));
|
||||
this._networkError(lazy.l10n.formatValueSync(message));
|
||||
return;
|
||||
}
|
||||
|
||||
let jid = aStanza.getElement(["bind", "jid"]);
|
||||
if (!jid) {
|
||||
this._networkError(lazy._("connection.error.failedToGetAResource"));
|
||||
this._networkError(
|
||||
lazy.l10n.formatValueSync("connection-error-failed-to-get-a-resource")
|
||||
);
|
||||
return;
|
||||
}
|
||||
jid = jid.innerText;
|
||||
|
@ -614,7 +646,9 @@ XMPPSession.prototype = {
|
|||
if (aStanza.attributes.type == "error") {
|
||||
const error = aStanza.getElement(["error"]);
|
||||
if (!error) {
|
||||
this._networkError(lazy._("connection.error.incorrectResponse"));
|
||||
this._networkError(
|
||||
lazy.l10n.formatValueSync("connection-error-incorrect-response")
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -623,14 +657,14 @@ XMPPSession.prototype = {
|
|||
// Failed Authentication (Incorrect Credentials)
|
||||
this.onError(
|
||||
Ci.prplIAccount.ERROR_AUTHENTICATION_FAILED,
|
||||
lazy._("connection.error.notAuthorized")
|
||||
lazy.l10n.formatValueSync("connection-error-not-authorized")
|
||||
);
|
||||
return;
|
||||
} else if (code == 406) {
|
||||
// Failed Authentication (Required Information Not Provided)
|
||||
this.onError(
|
||||
Ci.prplIAccount.ERROR_AUTHENTICATION_FAILED,
|
||||
lazy._("connection.error.authenticationFailure")
|
||||
lazy.l10n.formatValueSync("connection-error-authentication-failure")
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
@ -645,7 +679,9 @@ XMPPSession.prototype = {
|
|||
}
|
||||
|
||||
if (aStanza.attributes.type != "result") {
|
||||
this._networkError(lazy._("connection.error.incorrectResponse"));
|
||||
this._networkError(
|
||||
lazy.l10n.formatValueSync("connection-error-incorrect-response")
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -663,7 +699,9 @@ XMPPSession.prototype = {
|
|||
}
|
||||
|
||||
if (!("username" in values) || !("resource" in values)) {
|
||||
this._networkError(lazy._("connection.error.incorrectResponse"));
|
||||
this._networkError(
|
||||
lazy.l10n.formatValueSync("connection-error-incorrect-response")
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -713,7 +751,9 @@ XMPPSession.prototype = {
|
|||
) {
|
||||
this.onError(
|
||||
Ci.prplIAccount.ERROR_AUTHENTICATION_IMPOSSIBLE,
|
||||
lazy._("connection.error.notSendingPasswordInClear")
|
||||
lazy.l10n.formatValueSync(
|
||||
"connection-error-not-sending-password-in-clear"
|
||||
)
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
@ -722,7 +762,7 @@ XMPPSession.prototype = {
|
|||
} else {
|
||||
this.onError(
|
||||
Ci.prplIAccount.ERROR_AUTHENTICATION_IMPOSSIBLE,
|
||||
lazy._("connection.error.noCompatibleAuthMec")
|
||||
lazy.l10n.formatValueSync("connection-error-no-compatible-auth-mec")
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -2,13 +2,14 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import { l10nHelper } from "resource:///modules/imXPCOMUtils.sys.mjs";
|
||||
import { GenericProtocolPrototype } from "resource:///modules/jsProtoHelper.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineLazyGetter(lazy, "_", () =>
|
||||
l10nHelper("chrome://chat/locale/xmpp.properties")
|
||||
ChromeUtils.defineLazyGetter(
|
||||
lazy,
|
||||
"l10n",
|
||||
() => new Localization(["chat/xmpp.ftl"], true)
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
XMPPAccountPrototype: "resource:///modules/xmpp-base.sys.mjs",
|
||||
|
@ -47,7 +48,7 @@ XMPPProtocol.prototype = {
|
|||
usernameSplits: [
|
||||
{
|
||||
get label() {
|
||||
return lazy._("options.domain");
|
||||
return lazy.l10n.formatValueSync("options-domain");
|
||||
},
|
||||
separator: "@",
|
||||
defaultValue: "jabber.org",
|
||||
|
@ -57,29 +58,35 @@ XMPPProtocol.prototype = {
|
|||
options: {
|
||||
resource: {
|
||||
get label() {
|
||||
return lazy._("options.resource");
|
||||
return lazy.l10n.formatValueSync("options-resource");
|
||||
},
|
||||
default: "",
|
||||
},
|
||||
priority: {
|
||||
get label() {
|
||||
return lazy._("options.priority");
|
||||
return lazy.l10n.formatValueSync("options-priority");
|
||||
},
|
||||
default: 0,
|
||||
},
|
||||
connection_security: {
|
||||
get label() {
|
||||
return lazy._("options.connectionSecurity");
|
||||
return lazy.l10n.formatValueSync("options-connection-security");
|
||||
},
|
||||
listValues: {
|
||||
get require_tls() {
|
||||
return lazy._("options.connectionSecurity.requireEncryption");
|
||||
return lazy.l10n.formatValueSync(
|
||||
"options-connection-security-require-encryption"
|
||||
);
|
||||
},
|
||||
get opportunistic_tls() {
|
||||
return lazy._("options.connectionSecurity.opportunisticTLS");
|
||||
return lazy.l10n.formatValueSync(
|
||||
"options-connection-security-opportunistic-tls"
|
||||
);
|
||||
},
|
||||
get allow_unencrypted_plain_auth() {
|
||||
return lazy._("options.connectionSecurity.allowUnencryptedAuth");
|
||||
return lazy.l10n.formatValueSync(
|
||||
"options-connection-security-allow-unencrypted-auth"
|
||||
);
|
||||
},
|
||||
// "old_ssl" and "none" are also supported, but not exposed in the UI.
|
||||
// Any unknown value will fallback to the opportunistic_tls behavior.
|
||||
|
@ -88,13 +95,13 @@ XMPPProtocol.prototype = {
|
|||
},
|
||||
server: {
|
||||
get label() {
|
||||
return lazy._("options.connectServer");
|
||||
return lazy.l10n.formatValueSync("options-connect-server");
|
||||
},
|
||||
default: "",
|
||||
},
|
||||
port: {
|
||||
get label() {
|
||||
return lazy._("options.connectPort");
|
||||
return lazy.l10n.formatValueSync("options-connect-port");
|
||||
},
|
||||
default: 5222,
|
||||
},
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import { l10nHelper } from "resource:///modules/imXPCOMUtils.sys.mjs";
|
||||
import {
|
||||
GenericAccountPrototype,
|
||||
GenericProtocolPrototype,
|
||||
|
@ -10,8 +9,10 @@ import {
|
|||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineLazyGetter(lazy, "_", () =>
|
||||
l10nHelper("chrome://chat/locale/yahoo.properties")
|
||||
ChromeUtils.defineLazyGetter(
|
||||
lazy,
|
||||
"l10n",
|
||||
() => new Localization(["chat/yahoo.ftl"], true)
|
||||
);
|
||||
|
||||
function YahooAccount(aProtoInstance, aImAccount) {
|
||||
|
@ -28,7 +29,7 @@ YahooAccount.prototype = {
|
|||
);
|
||||
this.reportDisconnecting(
|
||||
Ci.prplIAccount.ERROR_OTHER_ERROR,
|
||||
lazy._("yahoo.disabled")
|
||||
lazy.l10n.formatValueSync("yahoo-disabled")
|
||||
);
|
||||
this.reportDisconnected();
|
||||
},
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
# Any copyright is dedicated to the Public Domain.
|
||||
# http://creativecommons.org/publicdomain/zero/1.0/
|
||||
|
||||
import fluent.migratetb.helpers
|
||||
from fluent.migratetb import COPY
|
||||
from fluent.migratetb.helpers import transforms_from
|
||||
from fluent.migratetb.helpers import VARIABLE_REFERENCE
|
||||
|
||||
about_replacements = dict(
|
||||
{
|
||||
"%1$S": VARIABLE_REFERENCE("accountName"),
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
def migrate(ctx):
|
||||
"""Bug 1889422. - Chat Fluent Migrations - Properties Files 1. part {index}"""
|
||||
target = reference = "chat/accounts-properties.ftl"
|
||||
source = "chat/accounts.properties"
|
||||
|
||||
ctx.add_transforms(
|
||||
target,
|
||||
reference,
|
||||
transforms_from(
|
||||
"""
|
||||
|
||||
password-prompt-title = {REPLACE(from_path, "passwordPromptTitle", about_replacements)}
|
||||
password-prompt-text = {REPLACE(from_path, "passwordPromptText", about_replacements)}
|
||||
password-prompt-save-checkbox = {COPY(from_path, "passwordPromptSaveCheckbox")}
|
||||
|
||||
""",
|
||||
from_path=source,
|
||||
about_replacements=about_replacements,
|
||||
),
|
||||
)
|
|
@ -0,0 +1,52 @@
|
|||
# Any copyright is dedicated to the Public Domain.
|
||||
# http://creativecommons.org/publicdomain/zero/1.0/
|
||||
|
||||
import fluent.migratetb.helpers
|
||||
from fluent.migratetb import COPY
|
||||
from fluent.migratetb.helpers import transforms_from
|
||||
from fluent.migratetb.helpers import VARIABLE_REFERENCE
|
||||
|
||||
about_replacements_command = dict(
|
||||
{
|
||||
"%1$S": VARIABLE_REFERENCE("command"),
|
||||
}
|
||||
)
|
||||
|
||||
about_replacements_command_status = dict(
|
||||
{
|
||||
"%1$S": VARIABLE_REFERENCE("command"),
|
||||
"%2$S": VARIABLE_REFERENCE("status"),
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
def migrate(ctx):
|
||||
"""Bug 1889422. - Chat Fluent Migrations - Properties Files 2. part {index}"""
|
||||
target = reference = "chat/commands.ftl"
|
||||
source = "chat/commands.properties"
|
||||
|
||||
ctx.add_transforms(
|
||||
target,
|
||||
reference,
|
||||
transforms_from(
|
||||
"""
|
||||
|
||||
commands-key = {REPLACE(from_path, "commands", about_replacements_command)}
|
||||
no-command = {REPLACE(from_path, "noCommand", about_replacements_command)}
|
||||
no-help-key = {REPLACE(from_path, "noHelp", about_replacements_command)}
|
||||
say-help-string = {COPY(from_path, "sayHelpString")}
|
||||
raw-help-string = {COPY(from_path, "rawHelpString")}
|
||||
help-help-string = {COPY(from_path, "helpHelpString")}
|
||||
status-command = {REPLACE(from_path, "statusCommand", about_replacements_command_status)}
|
||||
back-key-key = {COPY(from_path, "back")}
|
||||
away-key-key = {COPY(from_path, "away")}
|
||||
busy-key-key = {COPY(from_path, "busy")}
|
||||
dnd-key-key = {COPY(from_path, "dnd")}
|
||||
offline-key-key = {COPY(from_path, "offline")}
|
||||
|
||||
""",
|
||||
from_path=source,
|
||||
about_replacements_command=about_replacements_command,
|
||||
about_replacements_command_status=about_replacements_command_status,
|
||||
),
|
||||
)
|
|
@ -0,0 +1,26 @@
|
|||
# Any copyright is dedicated to the Public Domain.
|
||||
# http://creativecommons.org/publicdomain/zero/1.0/
|
||||
|
||||
import fluent.migratetb.helpers
|
||||
from fluent.migratetb import COPY
|
||||
from fluent.migratetb.helpers import transforms_from
|
||||
from fluent.migratetb.helpers import VARIABLE_REFERENCE
|
||||
|
||||
|
||||
def migrate(ctx):
|
||||
"""Bug 1889422. - Chat Fluent Migrations - Properties Files 3. part {index}"""
|
||||
target = reference = "chat/contacts.ftl"
|
||||
source = "chat/contacts.properties"
|
||||
|
||||
ctx.add_transforms(
|
||||
target,
|
||||
reference,
|
||||
transforms_from(
|
||||
"""
|
||||
|
||||
default-group = {COPY(from_path, "defaultGroup")}
|
||||
|
||||
""",
|
||||
from_path=source,
|
||||
),
|
||||
)
|
|
@ -0,0 +1,98 @@
|
|||
# Any copyright is dedicated to the Public Domain.
|
||||
# http://creativecommons.org/publicdomain/zero/1.0/
|
||||
|
||||
import fluent.migratetb.helpers
|
||||
from fluent.migratetb import COPY
|
||||
from fluent.migratetb.helpers import transforms_from
|
||||
from fluent.migratetb.helpers import VARIABLE_REFERENCE
|
||||
|
||||
about_replacements_statuses = dict(
|
||||
{
|
||||
"%1$S": VARIABLE_REFERENCE("displayName"),
|
||||
"%2$S": VARIABLE_REFERENCE("statusType"),
|
||||
"%3$S": VARIABLE_REFERENCE("statusText"),
|
||||
}
|
||||
)
|
||||
about_replacements_message = dict(
|
||||
{
|
||||
"%1$S": VARIABLE_REFERENCE("message"),
|
||||
}
|
||||
)
|
||||
about_replacements_conversation_name = dict(
|
||||
{
|
||||
"%1$S": VARIABLE_REFERENCE("conversationName"),
|
||||
"%2$S": VARIABLE_REFERENCE("topic"),
|
||||
}
|
||||
)
|
||||
# topic-changed = { $user } has changed the topic to: { $topic }.
|
||||
about_replacements_user_topic = dict(
|
||||
{
|
||||
"%1$S": VARIABLE_REFERENCE("user"),
|
||||
"%2$S": VARIABLE_REFERENCE("topic"),
|
||||
}
|
||||
)
|
||||
about_replacements_oldnick_newick = dict(
|
||||
{
|
||||
"%1$S": VARIABLE_REFERENCE("oldNick"),
|
||||
"%2$S": VARIABLE_REFERENCE("newNick"),
|
||||
}
|
||||
)
|
||||
about_replacements_newnick = dict(
|
||||
{
|
||||
"%1$S": VARIABLE_REFERENCE("newNick"),
|
||||
}
|
||||
)
|
||||
|
||||
about_replacements_target_name_target_protocol = dict(
|
||||
{
|
||||
"%1$S": VARIABLE_REFERENCE("targetName"),
|
||||
"%2$S": VARIABLE_REFERENCE("targetProtocol"),
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
def migrate(ctx):
|
||||
"""Bug 1889422. - Chat Fluent Migrations - Properties Files 4. part {index}"""
|
||||
target = reference = "chat/conversations.ftl"
|
||||
source = "chat/conversations.properties"
|
||||
|
||||
ctx.add_transforms(
|
||||
target,
|
||||
reference,
|
||||
transforms_from(
|
||||
"""
|
||||
|
||||
target-changed = {REPLACE(from_path, "targetChanged", about_replacements_target_name_target_protocol)}
|
||||
status-changed = {REPLACE(from_path, "statusChanged", about_replacements_statuses)}
|
||||
status-changed-with-status-text = {REPLACE(from_path, "statusChangedWithStatusText", about_replacements_statuses)}
|
||||
status-changed-from-unknown = {REPLACE(from_path, "statusChangedFromUnknown", about_replacements_statuses)}
|
||||
status-changed-from-unknown-with-status-text = {REPLACE(from_path, "statusChangedFromUnknownWithStatusText", about_replacements_statuses)}
|
||||
status-known = {REPLACE(from_path, "statusKnown", about_replacements_statuses)}
|
||||
status-known-with-status-text = {REPLACE(from_path, "statusKnownWithStatusText", about_replacements_statuses)}
|
||||
status-unknown = {REPLACE(from_path, "statusUnknown", about_replacements_statuses)}
|
||||
account-disconnected = {COPY(from_path, "accountDisconnected")}
|
||||
account-reconnected = {COPY(from_path, "accountReconnected")}
|
||||
auto-reply = {REPLACE(from_path, "autoReply", about_replacements_message)}
|
||||
no-topic-key = {COPY(from_path, "noTopic")}
|
||||
topic-set = {REPLACE(from_path, "topicSet", about_replacements_conversation_name)}
|
||||
topic-not-set = {REPLACE(from_path, "topicNotSet", about_replacements_conversation_name)}
|
||||
topic-changed = {REPLACE(from_path, "topicChanged", about_replacements_user_topic)}
|
||||
topic-cleared = {REPLACE(from_path, "topicCleared", about_replacements_user_topic)}
|
||||
nick-set-key = {REPLACE(from_path, "nickSet", about_replacements_oldnick_newick)}
|
||||
nick-set-you = {REPLACE(from_path, "nickSet.you", about_replacements_newnick)}
|
||||
messenger-conversations-selections-ellipsis = {COPY(from_path, "messenger.conversations.selections.ellipsis")}
|
||||
messenger-conversations-selections-system-messages-template = {COPY(from_path, "messenger.conversations.selections.systemMessagesTemplate")}
|
||||
messenger-conversations-selections-content-messages-template = {COPY(from_path, "messenger.conversations.selections.contentMessagesTemplate")}
|
||||
messenger-conversations-selections-action-messages-template = {COPY(from_path, "messenger.conversations.selections.actionMessagesTemplate")}
|
||||
|
||||
""",
|
||||
from_path=source,
|
||||
about_replacements_target_name_target_protocol=about_replacements_target_name_target_protocol,
|
||||
about_replacements_statuses=about_replacements_statuses,
|
||||
about_replacements_message=about_replacements_message,
|
||||
about_replacements_conversation_name=about_replacements_conversation_name,
|
||||
about_replacements_user_topic=about_replacements_user_topic,
|
||||
about_replacements_oldnick_newick=about_replacements_oldnick_newick,
|
||||
about_replacements_newnick=about_replacements_newnick,
|
||||
),
|
||||
)
|
|
@ -0,0 +1,27 @@
|
|||
# Any copyright is dedicated to the Public Domain.
|
||||
# http://creativecommons.org/publicdomain/zero/1.0/
|
||||
|
||||
import fluent.migratetb.helpers
|
||||
from fluent.migratetb import COPY
|
||||
from fluent.migratetb.helpers import transforms_from
|
||||
from fluent.migratetb.helpers import VARIABLE_REFERENCE
|
||||
|
||||
|
||||
def migrate(ctx):
|
||||
"""Bug 1889422. - Chat Fluent Migrations - Properties Files 5. part {index}"""
|
||||
target = reference = "chat/facebook.ftl"
|
||||
source = "chat/facebook.properties"
|
||||
|
||||
ctx.add_transforms(
|
||||
target,
|
||||
reference,
|
||||
transforms_from(
|
||||
"""
|
||||
|
||||
facebook-chat-name = {COPY(from_path, "facebook.chat.name")}
|
||||
facebook-disabled = {COPY(from_path, "facebook.disabled")}
|
||||
|
||||
""",
|
||||
from_path=source,
|
||||
),
|
||||
)
|
|
@ -0,0 +1,30 @@
|
|||
# Any copyright is dedicated to the Public Domain.
|
||||
# http://creativecommons.org/publicdomain/zero/1.0/
|
||||
|
||||
import fluent.migratetb.helpers
|
||||
from fluent.migratetb import COPY
|
||||
from fluent.migratetb.helpers import transforms_from
|
||||
from fluent.migratetb.helpers import VARIABLE_REFERENCE
|
||||
|
||||
|
||||
def migrate(ctx):
|
||||
"""Bug 1889422. - Chat Fluent Migrations - Properties Files 6. part {index}"""
|
||||
target = reference = "chat/imtooltip.ftl"
|
||||
source = "chat/imtooltip.properties"
|
||||
|
||||
ctx.add_transforms(
|
||||
target,
|
||||
reference,
|
||||
transforms_from(
|
||||
"""
|
||||
|
||||
buddy-username = {COPY(from_path, "buddy.username")}
|
||||
buddy-account = {COPY(from_path, "buddy.account")}
|
||||
contact-tags = {COPY(from_path, "contact.tags")}
|
||||
encryption-tag = {COPY(from_path, "encryption.tag")}
|
||||
message-status = {COPY(from_path, "message.status")}
|
||||
|
||||
""",
|
||||
from_path=source,
|
||||
),
|
||||
)
|
|
@ -0,0 +1,306 @@
|
|||
# Any copyright is dedicated to the Public Domain.
|
||||
# http://creativecommons.org/publicdomain/zero/1.0/
|
||||
|
||||
import fluent.syntax.ast as FTL
|
||||
import fluent.migratetb.helpers
|
||||
from fluent.migratetb import COPY
|
||||
from fluent.migratetb.helpers import transforms_from
|
||||
from fluent.migratetb.helpers import VARIABLE_REFERENCE
|
||||
from fluent.migratetb.helpers import REPLACE
|
||||
from fluent.migratetb.transforms import Transform, TransformPattern, PLURALS, REPLACE_IN_TEXT
|
||||
|
||||
|
||||
replacements_channelName = dict({"%1$S": VARIABLE_REFERENCE("channelName")})
|
||||
replacements_channelName_channelNameRedirect = dict(
|
||||
{"%1$S": VARIABLE_REFERENCE("channelName"), "%2$S": VARIABLE_REFERENCE("channelNameRedirect")}
|
||||
)
|
||||
replacements_commandName = dict({"%1$S": VARIABLE_REFERENCE("commandName")})
|
||||
replacements_description_value = dict(
|
||||
{"%1$S": VARIABLE_REFERENCE("description"), "%2$S": VARIABLE_REFERENCE("value")}
|
||||
)
|
||||
replacements_kickMessage = dict({"%1$S": VARIABLE_REFERENCE("kickMessage")})
|
||||
replacements_kickedNick_kickerNick_messageKickedReason = dict(
|
||||
{
|
||||
"%1$S": VARIABLE_REFERENCE("kickedNick"),
|
||||
"%2$S": VARIABLE_REFERENCE("kickerNick"),
|
||||
"%3$S": VARIABLE_REFERENCE("messageKickedReason"),
|
||||
}
|
||||
)
|
||||
replacements_locationMatches_nick = dict(
|
||||
{"%1$S": VARIABLE_REFERENCE("locationMatches"), "%2$S": VARIABLE_REFERENCE("nick")}
|
||||
)
|
||||
replacements_messagePartedReason = dict({"%1$S": VARIABLE_REFERENCE("messagePartedReason")})
|
||||
replacements_messagePartedReason_partMessage = dict(
|
||||
{"%1$S": VARIABLE_REFERENCE("messagePartedReason"), "%2$S": VARIABLE_REFERENCE("partMessage")}
|
||||
)
|
||||
replacements_mode = dict({"%1$S": VARIABLE_REFERENCE("mode")})
|
||||
replacements_mode_targetUser_sourceUser = dict(
|
||||
{
|
||||
"%1$S": VARIABLE_REFERENCE("mode"),
|
||||
"%2$S": VARIABLE_REFERENCE("targetUser"),
|
||||
"%3$S": VARIABLE_REFERENCE("sourceUser"),
|
||||
}
|
||||
)
|
||||
replacements_name = dict({"%1$S": VARIABLE_REFERENCE("name")})
|
||||
replacements_name_details = dict(
|
||||
{"%1$S": VARIABLE_REFERENCE("name"), "%2$S": VARIABLE_REFERENCE("details")}
|
||||
)
|
||||
replacements_mode_user = dict(
|
||||
{"%1$S": VARIABLE_REFERENCE("mode"), "%2$S": VARIABLE_REFERENCE("user")}
|
||||
)
|
||||
replacements_nick = dict({"%1$S": VARIABLE_REFERENCE("nick")})
|
||||
replacements_nick_conversationName = dict(
|
||||
{"%1$S": VARIABLE_REFERENCE("nick"), "%2$S": VARIABLE_REFERENCE("conversationName")}
|
||||
)
|
||||
replacements_nick_messageKickedReason = dict(
|
||||
{"%1$S": VARIABLE_REFERENCE("nick"), "%2$S": VARIABLE_REFERENCE("messageKickedReason")}
|
||||
)
|
||||
replacements_nick_newPassword = dict(
|
||||
{"%1$S": VARIABLE_REFERENCE("nick"), "%2$S": VARIABLE_REFERENCE("newPassword")}
|
||||
)
|
||||
replacements_nick_nickAndHost = dict(
|
||||
{"%1$S": VARIABLE_REFERENCE("nick"), "%2$S": VARIABLE_REFERENCE("nickAndHost")}
|
||||
)
|
||||
replacements_nick_quitMessage = dict(
|
||||
{"%1$S": VARIABLE_REFERENCE("nick"), "%2$S": VARIABLE_REFERENCE("quitMessage")}
|
||||
)
|
||||
replacements_partMessage = dict({"%1$S": VARIABLE_REFERENCE("partMessage")})
|
||||
replacements_place = dict({"%1$S": VARIABLE_REFERENCE("place")})
|
||||
replacements_serverName_serverInformation = dict(
|
||||
{"%1$S": VARIABLE_REFERENCE("serverName"), "%2$S": VARIABLE_REFERENCE("serverInformation")}
|
||||
)
|
||||
replacements_timespan = dict({"%1$S": VARIABLE_REFERENCE("timespan")})
|
||||
replacements_username = dict({"%1$S": VARIABLE_REFERENCE("username")})
|
||||
replacements_username_timeResponse = dict(
|
||||
{"%1$S": VARIABLE_REFERENCE("username"), "%2$S": VARIABLE_REFERENCE("timeResponse")}
|
||||
)
|
||||
replacements_username_version = dict(
|
||||
{"%1$S": VARIABLE_REFERENCE("username"), "%2$S": VARIABLE_REFERENCE("version")}
|
||||
)
|
||||
|
||||
about_replacements = dict(
|
||||
{
|
||||
"%1$S": VARIABLE_REFERENCE("var1"),
|
||||
"%2$S": VARIABLE_REFERENCE("var2"),
|
||||
"%3$S": VARIABLE_REFERENCE("var3"),
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
def migrate(ctx):
|
||||
"""Bug 1889422. - Chat Fluent Migrations - Properties Files 7. part {index}"""
|
||||
target = reference = "chat/irc.ftl"
|
||||
source = "chat/irc.properties"
|
||||
|
||||
ctx.add_transforms(
|
||||
target,
|
||||
reference,
|
||||
transforms_from(
|
||||
"""
|
||||
|
||||
irc-username-hint = {COPY(from_path, "irc.usernameHint")}
|
||||
connection-error-lost = {COPY(from_path, "connection.error.lost")}
|
||||
connection-error-time-out = {COPY(from_path, "connection.error.timeOut")}
|
||||
connection-error-invalid-username = {REPLACE(from_path, "connection.error.invalidUsername", replacements_username)}
|
||||
connection-error-invalid-password = {COPY(from_path, "connection.error.invalidPassword")}
|
||||
connection-error-password-required = {COPY(from_path, "connection.error.passwordRequired")}
|
||||
join-chat-channel = {COPY(from_path, "joinChat.channel")}
|
||||
join-chat-password = {COPY(from_path, "joinChat.password")}
|
||||
options-server = {COPY(from_path, "options.server")}
|
||||
options-port = {COPY(from_path, "options.port")}
|
||||
options-ssl = {COPY(from_path, "options.ssl")}
|
||||
options-encoding = {COPY(from_path, "options.encoding")}
|
||||
options-quit-message = {COPY(from_path, "options.quitMessage")}
|
||||
options-part-message = {COPY(from_path, "options.partMessage")}
|
||||
options-show-server-tab = {COPY(from_path, "options.showServerTab")}
|
||||
options-alternate-nicks = {COPY(from_path, "options.alternateNicks")}
|
||||
ctcp-version = {REPLACE(from_path, "ctcp.version", replacements_username_version)}
|
||||
ctcp-time = {REPLACE(from_path, "ctcp.time", replacements_username_timeResponse)}
|
||||
command-action = {REPLACE(from_path, "command.action", replacements_commandName)}
|
||||
command-ban = {REPLACE(from_path, "command.ban", replacements_commandName)}
|
||||
command-ctcp = {REPLACE(from_path, "command.ctcp", replacements_commandName)}
|
||||
command-chanserv = {REPLACE(from_path, "command.chanserv", replacements_commandName)}
|
||||
command-deop = {REPLACE(from_path, "command.deop", replacements_commandName)}
|
||||
command-devoice = {REPLACE(from_path, "command.devoice", replacements_commandName)}
|
||||
command-invite2 = {REPLACE(from_path, "command.invite2", replacements_commandName)}
|
||||
command-join = {REPLACE(from_path, "command.join", replacements_commandName)}
|
||||
command-kick = {REPLACE(from_path, "command.kick", replacements_commandName)}
|
||||
command-list = {REPLACE(from_path, "command.list", replacements_commandName)}
|
||||
command-memoserv = {REPLACE(from_path, "command.memoserv", replacements_commandName)}
|
||||
command-mode-user2 = {REPLACE(from_path, "command.modeUser2", replacements_commandName)}
|
||||
command-mode-channel2 = {REPLACE(from_path, "command.modeChannel2", replacements_commandName)}
|
||||
command-msg = {REPLACE(from_path, "command.msg", replacements_commandName)}
|
||||
command-nick = {REPLACE(from_path, "command.nick", replacements_commandName)}
|
||||
command-nickserv = {REPLACE(from_path, "command.nickserv", replacements_commandName)}
|
||||
command-notice = {REPLACE(from_path, "command.notice", replacements_commandName)}
|
||||
command-op = {REPLACE(from_path, "command.op", replacements_commandName)}
|
||||
command-operserv = {REPLACE(from_path, "command.operserv", replacements_commandName)}
|
||||
command-part = {REPLACE(from_path, "command.part", replacements_commandName)}
|
||||
command-ping = {REPLACE(from_path, "command.ping", replacements_commandName)}
|
||||
command-quit = {REPLACE(from_path, "command.quit", replacements_commandName)}
|
||||
command-quote = {REPLACE(from_path, "command.quote", replacements_commandName)}
|
||||
command-time = {REPLACE(from_path, "command.time", replacements_commandName)}
|
||||
command-topic = {REPLACE(from_path, "command.topic", replacements_commandName)}
|
||||
command-umode = {REPLACE(from_path, "command.umode", replacements_commandName)}
|
||||
command-version = {REPLACE(from_path, "command.version", replacements_commandName)}
|
||||
command-voice = {REPLACE(from_path, "command.voice", replacements_commandName)}
|
||||
command-whois2 = {REPLACE(from_path, "command.whois2", replacements_commandName)}
|
||||
message-join = {REPLACE(from_path, "message.join", replacements_nick_nickAndHost)}
|
||||
message-rejoined = {COPY(from_path, "message.rejoined")}
|
||||
message-kicked-you = {REPLACE(from_path, "message.kicked.you", replacements_nick_messageKickedReason)}
|
||||
message-kicked = {REPLACE(from_path, "message.kicked", replacements_kickedNick_kickerNick_messageKickedReason)}
|
||||
message-kicked-reason = {REPLACE(from_path, "message.kicked.reason", replacements_kickMessage)}
|
||||
message-usermode = {REPLACE(from_path, "message.usermode", replacements_mode_targetUser_sourceUser)}
|
||||
message-channelmode = {REPLACE(from_path, "message.channelmode", replacements_mode_user)}
|
||||
message-yourmode = {REPLACE(from_path, "message.yourmode", replacements_mode)}
|
||||
message-nick-fail = {REPLACE(from_path, "message.nick.fail", replacements_nick)}
|
||||
message-parted-you = {REPLACE(from_path, "message.parted.you", replacements_messagePartedReason)}
|
||||
message-parted = {REPLACE(from_path, "message.parted", replacements_messagePartedReason_partMessage)}
|
||||
message-parted-reason = {REPLACE(from_path, "message.parted.reason", replacements_partMessage)}
|
||||
message-quit = {REPLACE(from_path, "message.quit", replacements_nick_quitMessage)}
|
||||
message-quit2 = {REPLACE(from_path, "message.quit2", replacements_nick)}
|
||||
message-invite-received = {REPLACE(from_path, "message.inviteReceived", replacements_nick_conversationName)}
|
||||
message-invited = {REPLACE(from_path, "message.invited", replacements_nick_conversationName)}
|
||||
message-already-in-channel = {REPLACE(from_path, "message.alreadyInChannel", replacements_nick_conversationName)}
|
||||
message-summoned = {REPLACE(from_path, "message.summoned", replacements_nick)}
|
||||
message-whois = {REPLACE(from_path, "message.whois", replacements_nick)}
|
||||
message-whowas = {REPLACE(from_path, "message.whowas", replacements_nick)}
|
||||
message-whois-entry = {REPLACE(from_path, "message.whoisEntry", replacements_description_value)}
|
||||
message-unknown-nick = {REPLACE(from_path, "message.unknownNick", replacements_nick)}
|
||||
message-channel-key-added = {REPLACE(from_path, "message.channelKeyAdded", replacements_nick_newPassword)}
|
||||
message-channel-key-removed = {REPLACE(from_path, "message.channelKeyRemoved", replacements_nick)}
|
||||
message-ban-masks = {REPLACE(from_path, "message.banMasks", replacements_place)}
|
||||
message-no-ban-masks = {REPLACE(from_path, "message.noBanMasks", replacements_place)}
|
||||
message-ban-mask-added = {REPLACE(from_path, "message.banMaskAdded", replacements_locationMatches_nick)}
|
||||
message-ban-mask-removed = {REPLACE(from_path, "message.banMaskRemoved", replacements_locationMatches_nick)}
|
||||
|
||||
""",
|
||||
from_path=source,
|
||||
replacements_channelName=replacements_channelName,
|
||||
replacements_channelName_channelNameRedirect=replacements_channelName_channelNameRedirect,
|
||||
replacements_commandName=replacements_commandName,
|
||||
replacements_description_value=replacements_description_value,
|
||||
replacements_kickMessage=replacements_kickMessage,
|
||||
replacements_kickedNick_kickerNick_messageKickedReason=replacements_kickedNick_kickerNick_messageKickedReason,
|
||||
replacements_locationMatches_nick=replacements_locationMatches_nick,
|
||||
replacements_messagePartedReason=replacements_messagePartedReason,
|
||||
replacements_messagePartedReason_partMessage=replacements_messagePartedReason_partMessage,
|
||||
replacements_mode=replacements_mode,
|
||||
replacements_mode_targetUser_sourceUser=replacements_mode_targetUser_sourceUser,
|
||||
replacements_mode_user=replacements_mode_user,
|
||||
replacements_nick=replacements_nick,
|
||||
replacements_nick_conversationName=replacements_nick_conversationName,
|
||||
replacements_nick_messageKickedReason=replacements_nick_messageKickedReason,
|
||||
replacements_nick_newPassword=replacements_nick_newPassword,
|
||||
replacements_nick_nickAndHost=replacements_nick_nickAndHost,
|
||||
replacements_nick_quitMessage=replacements_nick_quitMessage,
|
||||
replacements_partMessage=replacements_partMessage,
|
||||
replacements_place=replacements_place,
|
||||
replacements_serverName_serverInformation=replacements_serverName_serverInformation,
|
||||
replacements_timespan=replacements_timespan,
|
||||
replacements_username=replacements_username,
|
||||
replacements_username_timeResponse=replacements_username_timeResponse,
|
||||
replacements_username_version=replacements_username_version,
|
||||
),
|
||||
)
|
||||
ctx.add_transforms(
|
||||
target,
|
||||
reference,
|
||||
[
|
||||
FTL.Message(
|
||||
id=FTL.Identifier("message-ping"),
|
||||
comment=FTL.Comment(
|
||||
"$source is the nickname of the user or the server that was pinged.\n$delay is the delay (in milliseconds)."
|
||||
),
|
||||
value=PLURALS(
|
||||
source,
|
||||
"message.ping",
|
||||
VARIABLE_REFERENCE("delay"),
|
||||
foreach=lambda n: REPLACE_IN_TEXT(
|
||||
n,
|
||||
dict(
|
||||
{
|
||||
"#2": VARIABLE_REFERENCE("delay"),
|
||||
"%1$S": VARIABLE_REFERENCE("source"),
|
||||
}
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
)
|
||||
|
||||
ctx.add_transforms(
|
||||
target,
|
||||
reference,
|
||||
transforms_from(
|
||||
"""
|
||||
|
||||
error-no-channel = {REPLACE(from_path, "error.noChannel", replacements_name)}
|
||||
error-too-many-channels = {REPLACE(from_path, "error.tooManyChannels", replacements_name)}
|
||||
error-nick-collision = {REPLACE(from_path, "error.nickCollision", replacements_name_details)}
|
||||
error-erroneous-nickname = {REPLACE(from_path, "error.erroneousNickname", replacements_name)}
|
||||
error-banned = {COPY(from_path, "error.banned")}
|
||||
error-banned-soon = {COPY(from_path, "error.bannedSoon")}
|
||||
error-mode-wrong-user = {COPY(from_path, "error.mode.wrongUser")}
|
||||
error-no-such-nick = {REPLACE(from_path, "error.noSuchNick", replacements_name)}
|
||||
error-was-no-such-nick = {REPLACE(from_path, "error.wasNoSuchNick", replacements_name)}
|
||||
error-no-such-channel = {REPLACE(from_path, "error.noSuchChannel", replacements_name)}
|
||||
error-unavailable = {REPLACE(from_path, "error.unavailable", replacements_name)}
|
||||
error-channel-banned = {REPLACE(from_path, "error.channelBanned", replacements_name)}
|
||||
error-cannot-send-to-channel = {REPLACE(from_path, "error.cannotSendToChannel", replacements_name)}
|
||||
error-channel-full = {REPLACE(from_path, "error.channelFull", replacements_name)}
|
||||
error-invite-only = {REPLACE(from_path, "error.inviteOnly", replacements_name)}
|
||||
error-non-unique-target = {REPLACE(from_path, "error.nonUniqueTarget", replacements_name)}
|
||||
error-not-channel-op = {REPLACE(from_path, "error.notChannelOp", replacements_name)}
|
||||
error-not-channel-owner = {REPLACE(from_path, "error.notChannelOwner", replacements_name)}
|
||||
error-wrong-key = {REPLACE(from_path, "error.wrongKey", replacements_name)}
|
||||
error-send-message-failed = {COPY(from_path, "error.sendMessageFailed")}
|
||||
error-channel-forward = {REPLACE(from_path, "error.channelForward", replacements_name_details)}
|
||||
error-unknown-mode = {REPLACE(from_path, "error.unknownMode", replacements_mode)}
|
||||
tooltip-realname = {COPY(from_path, "tooltip.realname")}
|
||||
tooltip-server = {COPY(from_path, "tooltip.server")}
|
||||
tooltip-connected-from = {COPY(from_path, "tooltip.connectedFrom")}
|
||||
tooltip-registered = {COPY(from_path, "tooltip.registered")}
|
||||
tooltip-registered-as = {COPY(from_path, "tooltip.registeredAs")}
|
||||
tooltip-secure = {COPY(from_path, "tooltip.secure")}
|
||||
tooltip-away = {COPY(from_path, "tooltip.away")}
|
||||
tooltip-irc-op = {COPY(from_path, "tooltip.ircOp")}
|
||||
tooltip-bot = {COPY(from_path, "tooltip.bot")}
|
||||
tooltip-last-activity = {COPY(from_path, "tooltip.lastActivity")}
|
||||
tooltip-timespan = {REPLACE(from_path, "tooltip.timespan", replacements_timespan)}
|
||||
tooltip-channels = {COPY(from_path, "tooltip.channels")}
|
||||
tooltip-server-value = {REPLACE(from_path, "tooltip.serverValue", replacements_serverName_serverInformation)}
|
||||
yes-key-key = {COPY(from_path, "yes")}
|
||||
no-key-key = {COPY(from_path, "no")}
|
||||
|
||||
""",
|
||||
from_path=source,
|
||||
replacements_name=replacements_name,
|
||||
replacements_name_details=replacements_name_details,
|
||||
replacements_channelName_channelNameRedirect=replacements_channelName_channelNameRedirect,
|
||||
replacements_commandName=replacements_commandName,
|
||||
replacements_description_value=replacements_description_value,
|
||||
replacements_kickMessage=replacements_kickMessage,
|
||||
replacements_kickedNick_kickerNick_messageKickedReason=replacements_kickedNick_kickerNick_messageKickedReason,
|
||||
replacements_locationMatches_nick=replacements_locationMatches_nick,
|
||||
replacements_messagePartedReason=replacements_messagePartedReason,
|
||||
replacements_messagePartedReason_partMessage=replacements_messagePartedReason_partMessage,
|
||||
replacements_mode=replacements_mode,
|
||||
replacements_mode_targetUser_sourceUser=replacements_mode_targetUser_sourceUser,
|
||||
replacements_mode_user=replacements_mode_user,
|
||||
replacements_nick=replacements_nick,
|
||||
replacements_nick_conversationName=replacements_nick_conversationName,
|
||||
replacements_nick_messageKickedReason=replacements_nick_messageKickedReason,
|
||||
replacements_nick_newPassword=replacements_nick_newPassword,
|
||||
replacements_nick_nickAndHost=replacements_nick_nickAndHost,
|
||||
replacements_nick_quitMessage=replacements_nick_quitMessage,
|
||||
replacements_partMessage=replacements_partMessage,
|
||||
replacements_place=replacements_place,
|
||||
replacements_serverName_serverInformation=replacements_serverName_serverInformation,
|
||||
replacements_timespan=replacements_timespan,
|
||||
replacements_username=replacements_username,
|
||||
replacements_username_timeResponse=replacements_username_timeResponse,
|
||||
replacements_username_version=replacements_username_version,
|
||||
),
|
||||
)
|
|
@ -0,0 +1,33 @@
|
|||
# Any copyright is dedicated to the Public Domain.
|
||||
# http://creativecommons.org/publicdomain/zero/1.0/
|
||||
|
||||
import fluent.migratetb.helpers
|
||||
from fluent.migratetb import COPY
|
||||
from fluent.migratetb.helpers import transforms_from
|
||||
from fluent.migratetb.helpers import VARIABLE_REFERENCE
|
||||
|
||||
about_replacements = dict(
|
||||
{
|
||||
"%1$S": VARIABLE_REFERENCE("filename"),
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
def migrate(ctx):
|
||||
"""Bug 1889422. - Chat Fluent Migrations - Properties Files 8. part {index}"""
|
||||
target = reference = "chat/logger.ftl"
|
||||
source = "chat/logger.properties"
|
||||
|
||||
ctx.add_transforms(
|
||||
target,
|
||||
reference,
|
||||
transforms_from(
|
||||
"""
|
||||
|
||||
bad-logfile = {REPLACE(from_path, "badLogfile", about_replacements)}
|
||||
|
||||
""",
|
||||
from_path=source,
|
||||
about_replacements=about_replacements,
|
||||
),
|
||||
)
|
|
@ -0,0 +1,287 @@
|
|||
# Any copyright is dedicated to the Public Domain.
|
||||
# http://creativecommons.org/publicdomain/zero/1.0/
|
||||
|
||||
import fluent.syntax.ast as FTL
|
||||
import fluent.migratetb.helpers
|
||||
from fluent.migratetb import COPY
|
||||
from fluent.migratetb.helpers import transforms_from
|
||||
from fluent.migratetb.helpers import VARIABLE_REFERENCE
|
||||
|
||||
replacements_commandName = dict({"%1$S": VARIABLE_REFERENCE("commandName")})
|
||||
replacements_message = dict({"%1$S": VARIABLE_REFERENCE("message")})
|
||||
replacements_powerLevelName = dict({"%1$S": VARIABLE_REFERENCE("powerLevelName")})
|
||||
replacements_powerLevelName_powerLevelNumber = dict(
|
||||
{"%1$S": VARIABLE_REFERENCE("powerLevelName"), "%2$S": VARIABLE_REFERENCE("powerLevelNumber")}
|
||||
)
|
||||
replacements_sessionId_sessionDisplayName = dict(
|
||||
{"%1$S": VARIABLE_REFERENCE("sessionId"), "%2$S": VARIABLE_REFERENCE("sessionDisplayName")}
|
||||
)
|
||||
replacements_status = dict({"%1$S": VARIABLE_REFERENCE("status")})
|
||||
replacements_timespan = dict({"%1$S": VARIABLE_REFERENCE("timespan")})
|
||||
replacements_user = dict({"%1$S": VARIABLE_REFERENCE("user")})
|
||||
replacements_s_to_user = dict({"$S": VARIABLE_REFERENCE("user")})
|
||||
replacements_userThatReacted_userThatSentMessage_reaction = dict(
|
||||
{
|
||||
"%1$S": VARIABLE_REFERENCE("userThatReacted"),
|
||||
"%2$S": VARIABLE_REFERENCE("userThatSentMessage"),
|
||||
"%3$S": VARIABLE_REFERENCE("reaction"),
|
||||
}
|
||||
)
|
||||
replacements_user_addresses = dict(
|
||||
{"%1$S": VARIABLE_REFERENCE("user"), "%2$S": VARIABLE_REFERENCE("addresses")}
|
||||
)
|
||||
replacements_user_changedName = dict(
|
||||
{"%1$S": VARIABLE_REFERENCE("user"), "%2$S": VARIABLE_REFERENCE("changedName")}
|
||||
)
|
||||
replacements_user_nameRemoved = dict(
|
||||
{"%1$S": VARIABLE_REFERENCE("user"), "%2$S": VARIABLE_REFERENCE("nameRemoved")}
|
||||
)
|
||||
replacements_user_newRoomName = dict(
|
||||
{"%1$S": VARIABLE_REFERENCE("user"), "%2$S": VARIABLE_REFERENCE("newRoomName")}
|
||||
)
|
||||
replacements_user_oldAddress_newAddress = dict(
|
||||
{
|
||||
"%1$S": VARIABLE_REFERENCE("user"),
|
||||
"%2$S": VARIABLE_REFERENCE("oldAddress"),
|
||||
"%3$S": VARIABLE_REFERENCE("newAddress"),
|
||||
}
|
||||
)
|
||||
replacements_user_oldDisplayName_newDisplayName = dict(
|
||||
{
|
||||
"%1$S": VARIABLE_REFERENCE("user"),
|
||||
"%2$S": VARIABLE_REFERENCE("oldDisplayName"),
|
||||
"%3$S": VARIABLE_REFERENCE("newDisplayName"),
|
||||
}
|
||||
)
|
||||
replacements_user_oldPowerLevel_newPowerLevel = dict(
|
||||
{
|
||||
"%1$S": VARIABLE_REFERENCE("user"),
|
||||
"%2$S": VARIABLE_REFERENCE("oldPowerLevel"),
|
||||
"%3$S": VARIABLE_REFERENCE("newPowerLevel"),
|
||||
}
|
||||
)
|
||||
replacements_user_powerLevelChanges = dict(
|
||||
{"%1$S": VARIABLE_REFERENCE("user"), "%2$S": VARIABLE_REFERENCE("powerLevelChanges")}
|
||||
)
|
||||
replacements_user_reason = dict(
|
||||
{"%1$S": VARIABLE_REFERENCE("user"), "%2$S": VARIABLE_REFERENCE("reason")}
|
||||
)
|
||||
replacements_user_removedAddresses_addedAddresses = dict(
|
||||
{
|
||||
"%1$S": VARIABLE_REFERENCE("user"),
|
||||
"%2$S": VARIABLE_REFERENCE("removedAddresses"),
|
||||
"%3$S": VARIABLE_REFERENCE("addedAddresses"),
|
||||
}
|
||||
)
|
||||
replacements_user_userBanned_reason = dict(
|
||||
{
|
||||
"%1$S": VARIABLE_REFERENCE("user"),
|
||||
"%2$S": VARIABLE_REFERENCE("userBanned"),
|
||||
"%3$S": VARIABLE_REFERENCE("reason"),
|
||||
}
|
||||
)
|
||||
replacements_user_userGotKicked = dict(
|
||||
{"%1$S": VARIABLE_REFERENCE("user"), "%2$S": VARIABLE_REFERENCE("userGotKicked")}
|
||||
)
|
||||
replacements_user_userGotKicked_reason = dict(
|
||||
{
|
||||
"%1$S": VARIABLE_REFERENCE("user"),
|
||||
"%2$S": VARIABLE_REFERENCE("userGotKicked"),
|
||||
"%3$S": VARIABLE_REFERENCE("reason"),
|
||||
}
|
||||
)
|
||||
replacements_user_userInvitationWithdrawn = dict(
|
||||
{"%1$S": VARIABLE_REFERENCE("user"), "%2$S": VARIABLE_REFERENCE("userInvitationWithdrawn")}
|
||||
)
|
||||
replacements_user_userInvitationWithdrawn_reason = dict(
|
||||
{
|
||||
"%1$S": VARIABLE_REFERENCE("user"),
|
||||
"%2$S": VARIABLE_REFERENCE("userInvitationWithdrawn"),
|
||||
"%3$S": VARIABLE_REFERENCE("reason"),
|
||||
}
|
||||
)
|
||||
replacements_user_userReceiving = dict(
|
||||
{"%1$S": VARIABLE_REFERENCE("user"), "%2$S": VARIABLE_REFERENCE("userReceiving")}
|
||||
)
|
||||
replacements_user_userTarget = dict(
|
||||
{"%1$S": VARIABLE_REFERENCE("user"), "%2$S": VARIABLE_REFERENCE("userTarget")}
|
||||
)
|
||||
replacements_user_userUnbanned = dict(
|
||||
{"%1$S": VARIABLE_REFERENCE("user"), "%2$S": VARIABLE_REFERENCE("userUnbanned")}
|
||||
)
|
||||
replacements_user_userWhoGotInvited = dict(
|
||||
{"%1$S": VARIABLE_REFERENCE("user"), "%2$S": VARIABLE_REFERENCE("userWhoGotInvited")}
|
||||
)
|
||||
replacements_user_userWhoSent = dict(
|
||||
{"%1$S": VARIABLE_REFERENCE("user"), "%2$S": VARIABLE_REFERENCE("userWhoSent")}
|
||||
)
|
||||
replacements_value = dict({"%1$S": VARIABLE_REFERENCE("value")})
|
||||
|
||||
|
||||
def migrate(ctx):
|
||||
"""Bug 1889422. - Chat Fluent Migrations - Properties Files 9. part {index}"""
|
||||
target = reference = "chat/matrix-properties.ftl"
|
||||
source = "chat/matrix.properties"
|
||||
|
||||
ctx.add_transforms(
|
||||
target,
|
||||
reference,
|
||||
transforms_from(
|
||||
"""
|
||||
|
||||
matrix-username-hint = {COPY(from_path, "matrix.usernameHint")}
|
||||
options-save-token = {COPY(from_path, "options.saveToken")}
|
||||
options-device-display-name = {COPY(from_path, "options.deviceDisplayName")}
|
||||
options-homeserver = {COPY(from_path, "options.homeserver")}
|
||||
options-backup-passphrase = {COPY(from_path, "options.backupPassphrase")}
|
||||
options-encryption-enabled = {REPLACE(from_path, "options.encryption.enabled", replacements_status)}
|
||||
options-encryption-secret-storage = {REPLACE(from_path, "options.encryption.secretStorage", replacements_status)}
|
||||
options-encryption-key-backup = {REPLACE(from_path, "options.encryption.keyBackup", replacements_status)}
|
||||
options-encryption-cross-signing = {REPLACE(from_path, "options.encryption.crossSigning", replacements_status)}
|
||||
options-encryption-status-ok = {COPY(from_path, "options.encryption.statusOk")}
|
||||
options-encryption-status-not-ok = {COPY(from_path, "options.encryption.statusNotOk")}
|
||||
options-encryption-need-backup-passphrase = {COPY(from_path, "options.encryption.needBackupPassphrase")}
|
||||
options-encryption-set-up-secret-storage = {COPY(from_path, "options.encryption.setUpSecretStorage")}
|
||||
options-encryption-set-up-backup-and-cross-signing = {COPY(from_path, "options.encryption.setUpBackupAndCrossSigning")}
|
||||
options-encryption-session = {REPLACE(from_path, "options.encryption.session", replacements_sessionId_sessionDisplayName)}
|
||||
connection-request-auth = {COPY(from_path, "connection.requestAuth")}
|
||||
connection-request-access = {COPY(from_path, "connection.requestAccess")}
|
||||
connection-error-no-supported-flow = {COPY(from_path, "connection.error.noSupportedFlow")}
|
||||
connection-error-auth-cancelled = {COPY(from_path, "connection.error.authCancelled")}
|
||||
connection-error-session-ended = {COPY(from_path, "connection.error.sessionEnded")}
|
||||
connection-error-server-not-found = {COPY(from_path, "connection.error.serverNotFound")}
|
||||
chat-room-field-room = {COPY(from_path, "chatRoomField.room")}
|
||||
tooltip-display-name = {COPY(from_path, "tooltip.displayName")}
|
||||
tooltip-timespan = {REPLACE(from_path, "tooltip.timespan", replacements_timespan)}
|
||||
tooltip-last-active = {COPY(from_path, "tooltip.lastActive")}
|
||||
power-level-default = {COPY(from_path, "powerLevel.default")}
|
||||
power-level-moderator = {COPY(from_path, "powerLevel.moderator")}
|
||||
power-level-admin = {COPY(from_path, "powerLevel.admin")}
|
||||
power-level-restricted = {COPY(from_path, "powerLevel.restricted")}
|
||||
power-level-custom = {COPY(from_path, "powerLevel.custom")}
|
||||
power-level-detailed = {REPLACE(from_path, "powerLevel.detailed", replacements_powerLevelName_powerLevelNumber)}
|
||||
power-level-default-role = {REPLACE(from_path, "powerLevel.defaultRole", replacements_powerLevelName)}
|
||||
power-level-invite-user = {REPLACE(from_path, "powerLevel.inviteUser", replacements_powerLevelName)}
|
||||
power-level-kick-users = {REPLACE(from_path, "powerLevel.kickUsers", replacements_powerLevelName)}
|
||||
power-level-ban = {REPLACE(from_path, "powerLevel.ban", replacements_powerLevelName)}
|
||||
power-level-room-avatar = {REPLACE(from_path, "powerLevel.roomAvatar", replacements_powerLevelName)}
|
||||
power-level-main-address = {REPLACE(from_path, "powerLevel.mainAddress", replacements_powerLevelName)}
|
||||
power-level-history = {REPLACE(from_path, "powerLevel.history", replacements_powerLevelName)}
|
||||
power-level-room-name = {REPLACE(from_path, "powerLevel.roomName", replacements_powerLevelName)}
|
||||
power-level-change-permissions = {REPLACE(from_path, "powerLevel.changePermissions", replacements_powerLevelName)}
|
||||
power-level-server-acl = {REPLACE(from_path, "powerLevel.server_acl", replacements_powerLevelName)}
|
||||
power-level-upgrade-room = {REPLACE(from_path, "powerLevel.upgradeRoom", replacements_powerLevelName)}
|
||||
power-level-remove = {REPLACE(from_path, "powerLevel.remove", replacements_powerLevelName)}
|
||||
power-level-events-default = {REPLACE(from_path, "powerLevel.events_default", replacements_powerLevelName)}
|
||||
power-level-state-default = {REPLACE(from_path, "powerLevel.state_default", replacements_powerLevelName)}
|
||||
power-level-encryption = {REPLACE(from_path, "powerLevel.encryption", replacements_powerLevelName)}
|
||||
power-level-topic = {REPLACE(from_path, "powerLevel.topic", replacements_powerLevelName)}
|
||||
detail-name = {REPLACE(from_path, "detail.name", replacements_value)}
|
||||
detail-topic = {REPLACE(from_path, "detail.topic", replacements_value)}
|
||||
detail-version = {REPLACE(from_path, "detail.version", replacements_value)}
|
||||
detail-room-id = {REPLACE(from_path, "detail.roomId", replacements_value)}
|
||||
detail-admin = {REPLACE(from_path, "detail.admin", replacements_value)}
|
||||
detail-moderator = {REPLACE(from_path, "detail.moderator", replacements_value)}
|
||||
detail-alias = {REPLACE(from_path, "detail.alias", replacements_value)}
|
||||
detail-guest = {REPLACE(from_path, "detail.guest", replacements_value)}
|
||||
detail-power = {COPY(from_path, "detail.power")}
|
||||
command-ban = {REPLACE(from_path, "command.ban", replacements_commandName)}
|
||||
command-invite = {REPLACE(from_path, "command.invite", replacements_commandName)}
|
||||
command-kick = {REPLACE(from_path, "command.kick", replacements_commandName)}
|
||||
command-nick = {REPLACE(from_path, "command.nick", replacements_commandName)}
|
||||
command-op = {REPLACE(from_path, "command.op", replacements_commandName)}
|
||||
command-deop = {REPLACE(from_path, "command.deop", replacements_commandName)}
|
||||
command-leave = {REPLACE(from_path, "command.leave", replacements_commandName)}
|
||||
command-topic = {REPLACE(from_path, "command.topic", replacements_commandName)}
|
||||
command-unban = {REPLACE(from_path, "command.unban", replacements_commandName)}
|
||||
command-visibility = {REPLACE(from_path, "command.visibility", replacements_commandName)}
|
||||
command-guest = {REPLACE(from_path, "command.guest", replacements_commandName)}
|
||||
command-roomname = {REPLACE(from_path, "command.roomname", replacements_commandName)}
|
||||
command-detail = {REPLACE(from_path, "command.detail", replacements_commandName)}
|
||||
command-addalias = {REPLACE(from_path, "command.addalias", replacements_commandName)}
|
||||
command-removealias = {REPLACE(from_path, "command.removealias", replacements_commandName)}
|
||||
command-upgraderoom = {REPLACE(from_path, "command.upgraderoom", replacements_commandName)}
|
||||
command-me = {REPLACE(from_path, "command.me", replacements_commandName)}
|
||||
command-msg = {REPLACE(from_path, "command.msg", replacements_commandName)}
|
||||
command-join = {REPLACE(from_path, "command.join", replacements_commandName)}
|
||||
message-banned = {REPLACE(from_path, "message.banned", replacements_user_userBanned_reason)}
|
||||
message-banned-with-reason = {REPLACE(from_path, "message.bannedWithReason", replacements_user_userBanned_reason)}
|
||||
message-accepted-invite-for = {REPLACE(from_path, "message.acceptedInviteFor", replacements_user_userWhoSent)}
|
||||
message-accepted-invite = {REPLACE(from_path, "message.acceptedInvite", replacements_s_to_user)}
|
||||
message-invited = {REPLACE(from_path, "message.invited", replacements_user_userWhoGotInvited)}
|
||||
message-display-name-changed = {REPLACE(from_path, "message.displayName.changed", replacements_user_oldDisplayName_newDisplayName)}
|
||||
message-display-name-set = {REPLACE(from_path, "message.displayName.set", replacements_user_changedName)}
|
||||
message-display-name-remove = {REPLACE(from_path, "message.displayName.remove", replacements_user_nameRemoved)}
|
||||
message-joined = {REPLACE(from_path, "message.joined", replacements_user)}
|
||||
message-rejected-invite = {REPLACE(from_path, "message.rejectedInvite", replacements_user)}
|
||||
message-left = {REPLACE(from_path, "message.left", replacements_user)}
|
||||
message-unbanned = {REPLACE(from_path, "message.unbanned", replacements_user_userUnbanned)}
|
||||
message-kicked = {REPLACE(from_path, "message.kicked", replacements_user_userGotKicked)}
|
||||
message-kicked-with-reason = {REPLACE(from_path, "message.kickedWithReason", replacements_user_userGotKicked_reason)}
|
||||
message-withdrew-invite = {REPLACE(from_path, "message.withdrewInvite", replacements_user_userInvitationWithdrawn)}
|
||||
message-withdrew-invite-with-reason = {REPLACE(from_path, "message.withdrewInviteWithReason", replacements_user_userInvitationWithdrawn_reason)}
|
||||
message-room-name-remove = {REPLACE(from_path, "message.roomName.remove", replacements_user)}
|
||||
message-room-name-changed = {REPLACE(from_path, "message.roomName.changed", replacements_user_newRoomName)}
|
||||
message-power-level-changed = {REPLACE(from_path, "message.powerLevel.changed", replacements_user_powerLevelChanges)}
|
||||
message-power-level-from-to = {REPLACE(from_path, "message.powerLevel.fromTo", replacements_user_oldPowerLevel_newPowerLevel)}
|
||||
message-guest-allowed = {REPLACE(from_path, "message.guest.allowed", replacements_user)}
|
||||
message-guest-prevented = {REPLACE(from_path, "message.guest.prevented", replacements_user)}
|
||||
message-history-anyone = {REPLACE(from_path, "message.history.anyone", replacements_user)}
|
||||
message-history-shared = {REPLACE(from_path, "message.history.shared", replacements_user)}
|
||||
message-history-invited = {REPLACE(from_path, "message.history.invited", replacements_user)}
|
||||
message-history-joined = {REPLACE(from_path, "message.history.joined", replacements_user)}
|
||||
message-alias-main = {REPLACE(from_path, "message.alias.main", replacements_user_oldAddress_newAddress)}
|
||||
message-alias-added = {REPLACE(from_path, "message.alias.added", replacements_user_addresses)}
|
||||
message-alias-removed = {REPLACE(from_path, "message.alias.removed", replacements_user_addresses)}
|
||||
message-alias-removed-and-added = {REPLACE(from_path, "message.alias.removedAndAdded", replacements_user_removedAddresses_addedAddresses)}
|
||||
message-space-not-supported = {COPY(from_path, "message.spaceNotSupported")}
|
||||
message-encryption-start = {COPY(from_path, "message.encryptionStart")}
|
||||
message-verification-request2 = {REPLACE(from_path, "message.verification.request2", replacements_user_userReceiving)}
|
||||
message-verification-cancel2 = {REPLACE(from_path, "message.verification.cancel2", replacements_user_reason)}
|
||||
message-verification-done = {COPY(from_path, "message.verification.done")}
|
||||
message-decryption-error = {COPY(from_path, "message.decryptionError")}
|
||||
message-decrypting = {COPY(from_path, "message.decrypting")}
|
||||
message-redacted = {COPY(from_path, "message.redacted")}
|
||||
message-reaction = {REPLACE(from_path, "message.reaction", replacements_userThatReacted_userThatSentMessage_reaction)}
|
||||
message-action-request-key = {COPY(from_path, "message.action.requestKey")}
|
||||
message-action-redact = {COPY(from_path, "message.action.redact")}
|
||||
message-action-report = {COPY(from_path, "message.action.report")}
|
||||
message-action-retry = {COPY(from_path, "message.action.retry")}
|
||||
message-action-cancel = {COPY(from_path, "message.action.cancel")}
|
||||
error-send-message-failed = {REPLACE(from_path, "error.sendMessageFailed", replacements_message)}
|
||||
|
||||
""",
|
||||
from_path=source,
|
||||
replacements_commandName=replacements_commandName,
|
||||
replacements_message=replacements_message,
|
||||
replacements_powerLevelName=replacements_powerLevelName,
|
||||
replacements_powerLevelName_powerLevelNumber=replacements_powerLevelName_powerLevelNumber,
|
||||
replacements_sessionId_sessionDisplayName=replacements_sessionId_sessionDisplayName,
|
||||
replacements_status=replacements_status,
|
||||
replacements_timespan=replacements_timespan,
|
||||
replacements_user=replacements_user,
|
||||
replacements_s_to_user=replacements_s_to_user,
|
||||
replacements_userThatReacted_userThatSentMessage_reaction=replacements_userThatReacted_userThatSentMessage_reaction,
|
||||
replacements_user_addresses=replacements_user_addresses,
|
||||
replacements_user_changedName=replacements_user_changedName,
|
||||
replacements_user_nameRemoved=replacements_user_nameRemoved,
|
||||
replacements_user_newRoomName=replacements_user_newRoomName,
|
||||
replacements_user_oldAddress_newAddress=replacements_user_oldAddress_newAddress,
|
||||
replacements_user_oldDisplayName_newDisplayName=replacements_user_oldDisplayName_newDisplayName,
|
||||
replacements_user_oldPowerLevel_newPowerLevel=replacements_user_oldPowerLevel_newPowerLevel,
|
||||
replacements_user_powerLevelChanges=replacements_user_powerLevelChanges,
|
||||
replacements_user_reason=replacements_user_reason,
|
||||
replacements_user_removedAddresses_addedAddresses=replacements_user_removedAddresses_addedAddresses,
|
||||
replacements_user_userBanned_reason=replacements_user_userBanned_reason,
|
||||
replacements_user_userGotKicked=replacements_user_userGotKicked,
|
||||
replacements_user_userGotKicked_reason=replacements_user_userGotKicked_reason,
|
||||
replacements_user_userInvitationWithdrawn=replacements_user_userInvitationWithdrawn,
|
||||
replacements_user_userInvitationWithdrawn_reason=replacements_user_userInvitationWithdrawn_reason,
|
||||
replacements_user_userReceiving=replacements_user_userReceiving,
|
||||
replacements_user_userTarget=replacements_user_userTarget,
|
||||
replacements_user_userUnbanned=replacements_user_userUnbanned,
|
||||
replacements_user_userWhoGotInvited=replacements_user_userWhoGotInvited,
|
||||
replacements_user_userWhoSent=replacements_user_userWhoSent,
|
||||
replacements_value=replacements_value,
|
||||
),
|
||||
)
|
|
@ -0,0 +1,44 @@
|
|||
# Any copyright is dedicated to the Public Domain.
|
||||
# http://creativecommons.org/publicdomain/zero/1.0/
|
||||
|
||||
import fluent.migratetb.helpers
|
||||
from fluent.migratetb import COPY
|
||||
from fluent.migratetb.helpers import transforms_from
|
||||
from fluent.migratetb.helpers import VARIABLE_REFERENCE
|
||||
|
||||
# # $statusType is the status type, $statusMessage is the status message text.
|
||||
about_replacements = dict(
|
||||
{
|
||||
"%1$S": VARIABLE_REFERENCE("statusType"),
|
||||
"%2$S": VARIABLE_REFERENCE("statusMessage"),
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
def migrate(ctx):
|
||||
"""Bug 1889422. - Chat Fluent Migrations - Properties Files 10. part {index}"""
|
||||
target = reference = "chat/status.ftl"
|
||||
source = "chat/status.properties"
|
||||
|
||||
ctx.add_transforms(
|
||||
target,
|
||||
reference,
|
||||
transforms_from(
|
||||
"""
|
||||
|
||||
available-status-type = {COPY(from_path, "availableStatusType")}
|
||||
away-status-type = {COPY(from_path, "awayStatusType")}
|
||||
unavailable-status-type = {COPY(from_path, "unavailableStatusType")}
|
||||
offline-status-type = {COPY(from_path, "offlineStatusType")}
|
||||
invisible-status-type = {COPY(from_path, "invisibleStatusType")}
|
||||
idle-status-type = {COPY(from_path, "idleStatusType")}
|
||||
mobile-status-type = {COPY(from_path, "mobileStatusType")}
|
||||
unknown-status-type = {COPY(from_path, "unknownStatusType")}
|
||||
status-with-status-message = {REPLACE(from_path, "statusWithStatusMessage", about_replacements)}
|
||||
messenger-status-default-idle-away-message = {COPY(from_path, "messenger.status.defaultIdleAwayMessage")}
|
||||
|
||||
""",
|
||||
from_path=source,
|
||||
about_replacements=about_replacements,
|
||||
),
|
||||
)
|
|
@ -0,0 +1,27 @@
|
|||
# Any copyright is dedicated to the Public Domain.
|
||||
# http://creativecommons.org/publicdomain/zero/1.0/
|
||||
|
||||
import fluent.migratetb.helpers
|
||||
from fluent.migratetb import COPY
|
||||
from fluent.migratetb.helpers import transforms_from
|
||||
from fluent.migratetb.helpers import VARIABLE_REFERENCE
|
||||
|
||||
|
||||
def migrate(ctx):
|
||||
"""Bug 1889422. - Chat Fluent Migrations - Properties Files 11. part {index}"""
|
||||
target = reference = "chat/twitter.ftl"
|
||||
source = "chat/twitter.properties"
|
||||
|
||||
ctx.add_transforms(
|
||||
target,
|
||||
reference,
|
||||
transforms_from(
|
||||
"""
|
||||
|
||||
twitter-protocol-name = {COPY(from_path, "twitter.protocolName")}
|
||||
twitter-disabled = {COPY(from_path, "twitter.disabled")}
|
||||
|
||||
""",
|
||||
from_path=source,
|
||||
),
|
||||
)
|
|
@ -0,0 +1,293 @@
|
|||
# Any copyright is dedicated to the Public Domain.
|
||||
# http://creativecommons.org/publicdomain/zero/1.0/
|
||||
|
||||
import fluent.syntax.ast as FTL
|
||||
import fluent.migratetb.helpers
|
||||
from fluent.migratetb import COPY
|
||||
from fluent.migratetb.helpers import transforms_from
|
||||
from fluent.migratetb.helpers import VARIABLE_REFERENCE
|
||||
|
||||
replacements_commandName = dict({"%1$S": VARIABLE_REFERENCE("commandName")})
|
||||
replacements_invitee = dict({"%1$S": VARIABLE_REFERENCE("invitee")})
|
||||
replacements_invitee_declineMessage = dict(
|
||||
{"%1$S": VARIABLE_REFERENCE("invitee"), "%2$S": VARIABLE_REFERENCE("declineMessage")}
|
||||
)
|
||||
replacements_inviter_room = dict(
|
||||
{"%1$S": VARIABLE_REFERENCE("inviter"), "%2$S": VARIABLE_REFERENCE("room")}
|
||||
)
|
||||
replacements_affectedNick_reason = dict(
|
||||
{"%1$S": VARIABLE_REFERENCE("affectedNick"), "%2$S": VARIABLE_REFERENCE("reason")}
|
||||
)
|
||||
replacements_inviter_room_password = dict(
|
||||
{
|
||||
"%1$S": VARIABLE_REFERENCE("inviter"),
|
||||
"%2$S": VARIABLE_REFERENCE("room"),
|
||||
"%3$S": VARIABLE_REFERENCE("password"),
|
||||
}
|
||||
)
|
||||
eplacements_affectedNick_reason = dict(
|
||||
{
|
||||
"%1$S": VARIABLE_REFERENCE("affectedNick"),
|
||||
"%2$S": VARIABLE_REFERENCE("reason"),
|
||||
}
|
||||
)
|
||||
replacements_inviter_room_password_reason = dict(
|
||||
{
|
||||
"%1$S": VARIABLE_REFERENCE("inviter"),
|
||||
"%2$S": VARIABLE_REFERENCE("room"),
|
||||
"%3$S": VARIABLE_REFERENCE("password"),
|
||||
"%4$S": VARIABLE_REFERENCE("reason"),
|
||||
}
|
||||
)
|
||||
replacements_inviter_room_reason = dict(
|
||||
{
|
||||
"%1$S": VARIABLE_REFERENCE("inviter"),
|
||||
"%2$S": VARIABLE_REFERENCE("room"),
|
||||
"%3$S": VARIABLE_REFERENCE("reason"),
|
||||
}
|
||||
)
|
||||
replacements_jabberIdentifier = dict({"%1$S": VARIABLE_REFERENCE("jabberIdentifier")})
|
||||
replacements_jabberIdentifier_message = dict(
|
||||
{"%1$S": VARIABLE_REFERENCE("jabberIdentifier"), "%2$S": VARIABLE_REFERENCE("message")}
|
||||
)
|
||||
replacement_affectedNick = dict({"%1$S": VARIABLE_REFERENCE("affectedNick")})
|
||||
replacement_affectedNick_reason = dict(
|
||||
{"%1$S": VARIABLE_REFERENCE("affectedNick"), "%2$S": VARIABLE_REFERENCE("reason")}
|
||||
)
|
||||
replacements_actorNick = dict({"%1$S": VARIABLE_REFERENCE("actorNick")})
|
||||
replacements_actorNick_affectedNick = dict(
|
||||
{"%1$S": VARIABLE_REFERENCE("actorNick"), "%2$S": VARIABLE_REFERENCE("affectedNick")}
|
||||
)
|
||||
replacements_actorNick_affectedNick_reason = dict(
|
||||
{
|
||||
"%1$S": VARIABLE_REFERENCE("actorNick"),
|
||||
"%2$S": VARIABLE_REFERENCE("affectedNick"),
|
||||
"%3$S": VARIABLE_REFERENCE("reason"),
|
||||
}
|
||||
)
|
||||
replacements_actorNick = dict({"%1$S": VARIABLE_REFERENCE("actorNick")})
|
||||
replacements_actorNick_reason = dict(
|
||||
{"%1$S": VARIABLE_REFERENCE("actorNick"), "%2$S": VARIABLE_REFERENCE("reason")}
|
||||
)
|
||||
replacements_message = dict({"%1$S": VARIABLE_REFERENCE("message")})
|
||||
replacements_mucName = dict({"%1$S": VARIABLE_REFERENCE("mucName")})
|
||||
replacements_mucName_message = dict(
|
||||
{"%1$S": VARIABLE_REFERENCE("mucName"), "%2$S": VARIABLE_REFERENCE("message")}
|
||||
)
|
||||
replacements_nick = dict({"%1$S": VARIABLE_REFERENCE("nick")})
|
||||
replacements_participant = dict({"%1$S": VARIABLE_REFERENCE("participant")})
|
||||
replacements_participant_message = dict(
|
||||
{"%1$S": VARIABLE_REFERENCE("participant"), "%2$S": VARIABLE_REFERENCE("message")}
|
||||
)
|
||||
replacements_participant_reason = dict(
|
||||
{"%1$S": VARIABLE_REFERENCE("participant"), "%2$S": VARIABLE_REFERENCE("reason")}
|
||||
)
|
||||
replacements_actorNick = dict({"%1$S": VARIABLE_REFERENCE("actorNick")})
|
||||
replacements_actorNick_affectedNick = dict(
|
||||
{"%1$S": VARIABLE_REFERENCE("actorNick"), "%2$S": VARIABLE_REFERENCE("affectedNick")}
|
||||
)
|
||||
replacements_affectedNick = dict({"%1$S": VARIABLE_REFERENCE("affectedNick")})
|
||||
replacements_actorNick_affectedNick_reason = dict(
|
||||
{
|
||||
"%1$S": VARIABLE_REFERENCE("actorNick"),
|
||||
"%2$S": VARIABLE_REFERENCE("affectedNick"),
|
||||
"%3$S": VARIABLE_REFERENCE("reason"),
|
||||
}
|
||||
)
|
||||
replacements_actorNick_reason = dict(
|
||||
{"%1$S": VARIABLE_REFERENCE("actorNick"), "%2$S": VARIABLE_REFERENCE("reason")}
|
||||
)
|
||||
replacements_reason = dict({"%1$S": VARIABLE_REFERENCE("reason")})
|
||||
replacements_recipient = dict({"%1$S": VARIABLE_REFERENCE("recipient")})
|
||||
replacements_resourceIdentifier = dict({"%1$S": VARIABLE_REFERENCE("resourceIdentifier")})
|
||||
replacements_user = dict({"%1$S": VARIABLE_REFERENCE("user")})
|
||||
replacements_user_clientName_clientVersion = dict(
|
||||
{
|
||||
"%1$S": VARIABLE_REFERENCE("user"),
|
||||
"%2$S": VARIABLE_REFERENCE("clientName"),
|
||||
"%3$S": VARIABLE_REFERENCE("clientVersion"),
|
||||
}
|
||||
)
|
||||
replacements_user_clientName_clientVersion_systemResponse = dict(
|
||||
{
|
||||
"%1$S": VARIABLE_REFERENCE("user"),
|
||||
"%2$S": VARIABLE_REFERENCE("clientName"),
|
||||
"%3$S": VARIABLE_REFERENCE("clientVersion"),
|
||||
"%4$S": VARIABLE_REFERENCE("systemResponse"),
|
||||
}
|
||||
)
|
||||
replacements_affectedNick_actorNick = dict(
|
||||
{"%1$S": VARIABLE_REFERENCE("affectedNick"), "%2$S": VARIABLE_REFERENCE("actorNick")}
|
||||
)
|
||||
|
||||
|
||||
def migrate(ctx):
|
||||
"""Bug 1889422. - Chat Fluent Migrations - Properties Files 12. part {index}"""
|
||||
target = reference = "chat/xmpp.ftl"
|
||||
source = "chat/xmpp.properties"
|
||||
|
||||
ctx.add_transforms(
|
||||
target,
|
||||
reference,
|
||||
transforms_from(
|
||||
"""
|
||||
|
||||
connection-initializing-stream = {COPY(from_path, "connection.initializingStream")}
|
||||
connection-initializing-encryption = {COPY(from_path, "connection.initializingEncryption")}
|
||||
connection-authenticating = {COPY(from_path, "connection.authenticating")}
|
||||
connection-getting-resource = {COPY(from_path, "connection.gettingResource")}
|
||||
connection-downloading-roster = {COPY(from_path, "connection.downloadingRoster")}
|
||||
connection-srv-lookup = {COPY(from_path, "connection.srvLookup")}
|
||||
connection-error-invalid-username = {COPY(from_path, "connection.error.invalidUsername")}
|
||||
connection-error-failed-to-create-a-socket = {COPY(from_path, "connection.error.failedToCreateASocket")}
|
||||
connection-error-server-closed-connection = {COPY(from_path, "connection.error.serverClosedConnection")}
|
||||
connection-error-reset-by-peer = {COPY(from_path, "connection.error.resetByPeer")}
|
||||
connection-error-timed-out = {COPY(from_path, "connection.error.timedOut")}
|
||||
connection-error-received-unexpected-data = {COPY(from_path, "connection.error.receivedUnexpectedData")}
|
||||
connection-error-incorrect-response = {COPY(from_path, "connection.error.incorrectResponse")}
|
||||
connection-error-start-tls-required = {COPY(from_path, "connection.error.startTLSRequired")}
|
||||
connection-error-start-tls-not-supported = {COPY(from_path, "connection.error.startTLSNotSupported")}
|
||||
connection-error-failed-to-start-tls = {COPY(from_path, "connection.error.failedToStartTLS")}
|
||||
connection-error-no-auth-mec = {COPY(from_path, "connection.error.noAuthMec")}
|
||||
connection-error-no-compatible-auth-mec = {COPY(from_path, "connection.error.noCompatibleAuthMec")}
|
||||
connection-error-not-sending-password-in-clear = {COPY(from_path, "connection.error.notSendingPasswordInClear")}
|
||||
connection-error-authentication-failure = {COPY(from_path, "connection.error.authenticationFailure")}
|
||||
connection-error-not-authorized = {COPY(from_path, "connection.error.notAuthorized")}
|
||||
connection-error-failed-to-get-a-resource = {COPY(from_path, "connection.error.failedToGetAResource")}
|
||||
connection-error-failed-max-resource-limit = {COPY(from_path, "connection.error.failedMaxResourceLimit")}
|
||||
connection-error-failed-resource-not-valid = {COPY(from_path, "connection.error.failedResourceNotValid")}
|
||||
connection-error-xmpp-not-supported = {COPY(from_path, "connection.error.XMPPNotSupported")}
|
||||
conversation-error-not-delivered = {REPLACE(from_path, "conversation.error.notDelivered", replacements_message)}
|
||||
conversation-error-join-failed = {REPLACE(from_path, "conversation.error.joinFailed", replacements_mucName)}
|
||||
conversation-error-join-forbidden = {REPLACE(from_path, "conversation.error.joinForbidden", replacements_mucName)}
|
||||
conversation-error-join-failed-not-authorized = {COPY(from_path, "conversation.error.joinFailedNotAuthorized")}
|
||||
conversation-error-creation-failed-not-allowed = {COPY(from_path, "conversation.error.creationFailedNotAllowed")}
|
||||
conversation-error-join-failed-remote-server-not-found = {REPLACE(from_path, "conversation.error.joinFailedRemoteServerNotFound", replacements_mucName)}
|
||||
conversation-error-change-topic-failed-not-authorized = {COPY(from_path, "conversation.error.changeTopicFailedNotAuthorized")}
|
||||
conversation-error-send-failed-as-not-inroom = {REPLACE(from_path, "conversation.error.sendFailedAsNotInRoom", replacements_mucName_message)}
|
||||
conversation-error-send-failed-as-recipient-not-inroom = {REPLACE(from_path, "conversation.error.sendFailedAsRecipientNotInRoom", replacements_jabberIdentifier_message)}
|
||||
conversation-error-remote-server-not-found = {COPY(from_path, "conversation.error.remoteServerNotFound")}
|
||||
conversation-error-unknown-send-error = {COPY(from_path, "conversation.error.unknownSendError")}
|
||||
conversation-error-send-service-unavailable = {REPLACE(from_path, "conversation.error.sendServiceUnavailable", replacements_nick)}
|
||||
conversation-error-nick-not-in-room = {REPLACE(from_path, "conversation.error.nickNotInRoom", replacements_nick)}
|
||||
conversation-error-ban-command-anonymous-room = {COPY(from_path, "conversation.error.banCommandAnonymousRoom")}
|
||||
conversation-error-ban-kick-command-not-allowed = {COPY(from_path, "conversation.error.banKickCommandNotAllowed")}
|
||||
conversation-error-ban-kick-command-conflict = {COPY(from_path, "conversation.error.banKickCommandConflict")}
|
||||
conversation-error-change-nick-failed-conflict = {REPLACE(from_path, "conversation.error.changeNickFailedConflict", replacements_nick)}
|
||||
conversation-error-change-nick-failed-not-acceptable = {REPLACE(from_path, "conversation.error.changeNickFailedNotAcceptable", replacements_nick)}
|
||||
conversation-error-invite-failed-forbidden = {COPY(from_path, "conversation.error.inviteFailedForbidden")}
|
||||
conversation-error-failed-jid-not-found = {REPLACE(from_path, "conversation.error.failedJIDNotFound", replacements_jabberIdentifier)}
|
||||
conversation-error-invalid-jid = {REPLACE(from_path, "conversation.error.invalidJID", replacements_jabberIdentifier)}
|
||||
conversation-error-command-failed-not-in-room = {COPY(from_path, "conversation.error.commandFailedNotInRoom")}
|
||||
conversation-error-resource-not-available = {REPLACE(from_path, "conversation.error.resourceNotAvailable", replacements_recipient)}
|
||||
conversation-error-version-unknown = {REPLACE(from_path, "conversation.error.version.unknown", replacements_recipient)}
|
||||
tooltip-status = {REPLACE(from_path, "tooltip.status", replacements_resourceIdentifier)}
|
||||
tooltip-status-no-resource = {COPY(from_path, "tooltip.statusNoResource")}
|
||||
tooltip-subscription = {COPY(from_path, "tooltip.subscription")}
|
||||
tooltip-full-name = {COPY(from_path, "tooltip.fullName")}
|
||||
tooltip-nickname = {COPY(from_path, "tooltip.nickname")}
|
||||
tooltip-email = {COPY(from_path, "tooltip.email")}
|
||||
tooltip-birthday = {COPY(from_path, "tooltip.birthday")}
|
||||
tooltip-user-name = {COPY(from_path, "tooltip.userName")}
|
||||
tooltip-title = {COPY(from_path, "tooltip.title")}
|
||||
tooltip-organization = {COPY(from_path, "tooltip.organization")}
|
||||
tooltip-locality = {COPY(from_path, "tooltip.locality")}
|
||||
tooltip-country = {COPY(from_path, "tooltip.country")}
|
||||
tooltip-telephone = {COPY(from_path, "tooltip.telephone")}
|
||||
chat-room-field-room = {COPY(from_path, "chatRoomField.room")}
|
||||
chat-room-field-server = {COPY(from_path, "chatRoomField.server")}
|
||||
chat-room-field-nick = {COPY(from_path, "chatRoomField.nick")}
|
||||
chat-room-field-password = {COPY(from_path, "chatRoomField.password")}
|
||||
conversation-muc-invitation-with-reason2 = {REPLACE(from_path, "conversation.muc.invitationWithReason2", replacements_inviter_room_reason)}
|
||||
conversation-muc-invitation-with-reason2-password = {REPLACE(from_path, "conversation.muc.invitationWithReason2.password", replacements_inviter_room_password_reason)}
|
||||
conversation-muc-invitation-without-reason = {REPLACE(from_path, "conversation.muc.invitationWithoutReason", replacements_inviter_room)}
|
||||
conversation-muc-invitation-without-reason-password = {REPLACE(from_path, "conversation.muc.invitationWithoutReason.password", replacements_inviter_room_password)}
|
||||
conversation-message-join = {REPLACE(from_path, "conversation.message.join", replacements_participant)}
|
||||
conversation-message-rejoined = {COPY(from_path, "conversation.message.rejoined")}
|
||||
conversation-message-parted-you = {COPY(from_path, "conversation.message.parted.you")}
|
||||
conversation-message-parted-you-reason = {REPLACE(from_path, "conversation.message.parted.you.reason", replacements_message)}
|
||||
conversation-message-parted = {REPLACE(from_path, "conversation.message.parted", replacements_participant)}
|
||||
conversation-message-parted-reason = {REPLACE(from_path, "conversation.message.parted.reason", replacements_participant_message)}
|
||||
conversation-message-invitation-declined = {REPLACE(from_path, "conversation.message.invitationDeclined", replacements_invitee)}
|
||||
conversation-message-invitation-declined-reason = {REPLACE(from_path, "conversation.message.invitationDeclined.reason", replacements_invitee_declineMessage)}
|
||||
conversation-message-banned = {REPLACE(from_path, "conversation.message.banned", replacements_affectedNick)}
|
||||
conversation-message-banned-reason = {REPLACE(from_path, "conversation.message.banned.reason", replacements_affectedNick_reason)}
|
||||
conversation-message-banned-actor = {REPLACE(from_path, "conversation.message.banned.actor", replacements_actorNick_affectedNick)}
|
||||
conversation-message-banned-actor-reason = {REPLACE(from_path, "conversation.message.banned.actor.reason", replacements_actorNick_affectedNick_reason)}
|
||||
conversation-message-banned-you = {COPY(from_path, "conversation.message.banned.you")}
|
||||
conversation-message-banned-you-reason = {REPLACE(from_path, "conversation.message.banned.you.reason", replacements_reason)}
|
||||
conversation-message-banned-you-actor = {REPLACE(from_path, "conversation.message.banned.you.actor", replacements_actorNick)}
|
||||
conversation-message-banned-you-actor-reason = {REPLACE(from_path, "conversation.message.banned.you.actor.reason", replacements_actorNick_reason)}
|
||||
conversation-message-kicked = {REPLACE(from_path, "conversation.message.kicked", replacements_affectedNick)}
|
||||
conversation-message-kicked-reason = {REPLACE(from_path, "conversation.message.kicked.reason", replacements_affectedNick_reason)}
|
||||
conversation-message-kicked-actor = {REPLACE(from_path, "conversation.message.kicked.actor", replacements_actorNick_affectedNick)}
|
||||
conversation-message-kicked-actor-reason = {REPLACE(from_path, "conversation.message.kicked.actor.reason", replacements_actorNick_affectedNick_reason)}
|
||||
conversation-message-kicked-you = {COPY(from_path, "conversation.message.kicked.you")}
|
||||
conversation-message-kicked-you-reason = {REPLACE(from_path, "conversation.message.kicked.you.reason", replacements_reason)}
|
||||
conversation-message-kicked-you-actor = {REPLACE(from_path, "conversation.message.kicked.you.actor", replacements_actorNick)}
|
||||
conversation-message-kicked-you-actor-reason = {REPLACE(from_path, "conversation.message.kicked.you.actor.reason", replacements_actorNick_reason)}
|
||||
conversation-message-removed-non-member = {REPLACE(from_path, "conversation.message.removedNonMember", replacements_affectedNick)}
|
||||
conversation-message-removed-non-member-actor = {REPLACE(from_path, "conversation.message.removedNonMember.actor", replacements_affectedNick_actorNick)}
|
||||
conversation-message-removed-non-member-you = {COPY(from_path, "conversation.message.removedNonMember.you")}
|
||||
conversation-message-removed-non-member-you-actor = {REPLACE(from_path, "conversation.message.removedNonMember.you.actor", replacements_actorNick)}
|
||||
conversation-message-muc-shutdown = {COPY(from_path, "conversation.message.mucShutdown")}
|
||||
conversation-message-version = {REPLACE(from_path, "conversation.message.version", replacements_user_clientName_clientVersion)}
|
||||
conversation-message-version-with-os = {REPLACE(from_path, "conversation.message.versionWithOS", replacements_user_clientName_clientVersion_systemResponse)}
|
||||
options-resource = {COPY(from_path, "options.resource")}
|
||||
options-priority = {COPY(from_path, "options.priority")}
|
||||
options-connection-security = {COPY(from_path, "options.connectionSecurity")}
|
||||
options-connection-security-require-encryption = {COPY(from_path, "options.connectionSecurity.requireEncryption")}
|
||||
options-connection-security-opportunistic-tls = {COPY(from_path, "options.connectionSecurity.opportunisticTLS")}
|
||||
options-connection-security-allow-unencrypted-auth = {COPY(from_path, "options.connectionSecurity.allowUnencryptedAuth")}
|
||||
options-connect-server = {COPY(from_path, "options.connectServer")}
|
||||
options-connect-port = {COPY(from_path, "options.connectPort")}
|
||||
options-domain = {COPY(from_path, "options.domain")}
|
||||
gtalk-protocol-name = {COPY(from_path, "gtalk.protocolName")}
|
||||
odnoklassniki-protocol-name = {COPY(from_path, "odnoklassniki.protocolName")}
|
||||
gtalk-disabled = {COPY(from_path, "gtalk.disabled")}
|
||||
odnoklassniki-username-hint = {COPY(from_path, "odnoklassniki.usernameHint")}
|
||||
command-join3 = {REPLACE(from_path, "command.join3", replacements_commandName)}
|
||||
command-part2 = {REPLACE(from_path, "command.part2", replacements_commandName)}
|
||||
command-topic = {REPLACE(from_path, "command.topic", replacements_commandName)}
|
||||
command-ban = {REPLACE(from_path, "command.ban", replacements_commandName)}
|
||||
command-kick = {REPLACE(from_path, "command.kick", replacements_commandName)}
|
||||
command-invite = {REPLACE(from_path, "command.invite", replacements_commandName)}
|
||||
command-inviteto = {REPLACE(from_path, "command.inviteto", replacements_commandName)}
|
||||
command-me = {REPLACE(from_path, "command.me", replacements_commandName)}
|
||||
command-nick = {REPLACE(from_path, "command.nick", replacements_commandName)}
|
||||
command-msg = {REPLACE(from_path, "command.msg", replacements_commandName)}
|
||||
command-version = {REPLACE(from_path, "command.version", replacements_commandName)}
|
||||
|
||||
""",
|
||||
from_path=source,
|
||||
replacements_commandName=replacements_commandName,
|
||||
replacements_invitee=replacements_invitee,
|
||||
replacements_invitee_declineMessage=replacements_invitee_declineMessage,
|
||||
replacements_inviter_room=replacements_inviter_room,
|
||||
replacements_inviter_room_password=replacements_inviter_room_password,
|
||||
replacements_inviter_room_password_reason=replacements_inviter_room_password_reason,
|
||||
replacements_inviter_room_reason=replacements_inviter_room_reason,
|
||||
replacements_jabberIdentifier=replacements_jabberIdentifier,
|
||||
replacements_jabberIdentifier_message=replacements_jabberIdentifier_message,
|
||||
replacements_affectedNick=replacements_affectedNick,
|
||||
replacements_affectedNick_reason=replacements_affectedNick_reason,
|
||||
replacements_actorNick=replacements_actorNick,
|
||||
replacements_actorNick_affectedNick=replacements_actorNick_affectedNick,
|
||||
replacements_actorNick_affectedNick_reason=replacements_actorNick_affectedNick_reason,
|
||||
replacements_actorNick_reason=replacements_actorNick_reason,
|
||||
replacements_message=replacements_message,
|
||||
replacements_mucName=replacements_mucName,
|
||||
replacements_mucName_message=replacements_mucName_message,
|
||||
replacements_nick=replacements_nick,
|
||||
replacements_participant=replacements_participant,
|
||||
replacements_participant_message=replacements_participant_message,
|
||||
replacements_participant_reason=replacements_participant_reason,
|
||||
replacements_reason=replacements_reason,
|
||||
replacements_recipient=replacements_recipient,
|
||||
replacements_resourceIdentifier=replacements_resourceIdentifier,
|
||||
replacements_user=replacements_user,
|
||||
replacements_user_clientName_clientVersion=replacements_user_clientName_clientVersion,
|
||||
replacements_user_clientName_clientVersion_systemResponse=replacements_user_clientName_clientVersion_systemResponse,
|
||||
replacements_affectedNick_actorNick=replacements_affectedNick_actorNick,
|
||||
),
|
||||
)
|
|
@ -0,0 +1,26 @@
|
|||
# Any copyright is dedicated to the Public Domain.
|
||||
# http://creativecommons.org/publicdomain/zero/1.0/
|
||||
|
||||
import fluent.migratetb.helpers
|
||||
from fluent.migratetb import COPY
|
||||
from fluent.migratetb.helpers import transforms_from
|
||||
from fluent.migratetb.helpers import VARIABLE_REFERENCE
|
||||
|
||||
|
||||
def migrate(ctx):
|
||||
"""Bug 1889422. - Chat Fluent Migrations - Properties Files 13. part {index}"""
|
||||
target = reference = "chat/yahoo.ftl"
|
||||
source = "chat/yahoo.properties"
|
||||
|
||||
ctx.add_transforms(
|
||||
target,
|
||||
reference,
|
||||
transforms_from(
|
||||
"""
|
||||
|
||||
yahoo-disabled = {COPY(from_path, "yahoo.disabled")}
|
||||
|
||||
""",
|
||||
from_path=source,
|
||||
),
|
||||
)
|
|
@ -5,6 +5,11 @@ fluent-lint:
|
|||
- .
|
||||
exclude:
|
||||
- dom/l10n/tests/mochitest/document_l10n/non-system-principal/localization/test.ftl
|
||||
# Exclude files with single and double non-smart quotes during Migration
|
||||
- comm/chat/locales/en-US/matrix-properties.ftl
|
||||
- comm/chat/locales/en-US/irc.ftl
|
||||
- comm/chat/locales/en-US/commands.ftl
|
||||
- comm/chat/locales/en-US/xmpp.ftl
|
||||
extensions: ['ftl']
|
||||
support-files:
|
||||
- 'tools/lint/fluent-lint/*.py'
|
||||
|
|
Загрузка…
Ссылка в новой задаче