Page MenuHomePhorge

D2581.1775184932.diff
No OneTemporary

Authored By
Unknown
Size
168 KB
Referenced Files
None
Subscribers
None

D2581.1775184932.diff

diff --git a/src/resources/js/app.js b/src/resources/js/app.js
--- a/src/resources/js/app.js
+++ b/src/resources/js/app.js
@@ -193,16 +193,8 @@
// we can't really use router to display error page as it has two side
// effects: it changes the URL and adds the error page to browser history.
// For now we'll be replacing current view with error page "manually".
- const map = {
- 400: "Bad request",
- 401: "Unauthorized",
- 403: "Access denied",
- 404: "Not found",
- 405: "Method not allowed",
- 500: "Internal server error"
- }
- if (!msg) msg = map[code] || "Unknown Error"
+ if (!msg) msg = this.$te('error.' + code) ? this.$t('error.' + code) : this.$t('error.unknown')
if (!hint) hint = ''
const error_page = '<div id="error-page" class="error-page">'
@@ -255,6 +247,7 @@
})
},
price(price, currency) {
+ // TODO: Set locale argument according to the currently used locale
return ((price || 0) / 100).toLocaleString('de-DE', { style: 'currency', currency: currency || 'CHF' })
},
priceLabel(cost, discount) {
@@ -292,18 +285,18 @@
},
domainStatusText(domain) {
if (domain.isDeleted) {
- return 'Deleted'
+ return this.$t('status.deleted')
}
if (domain.isSuspended) {
- return 'Suspended'
+ return this.$t('status.suspended')
}
if (!domain.isVerified || !domain.isLdapReady || !domain.isConfirmed) {
- return 'Not Ready'
+ return this.$t('status.notready')
}
- return 'Active'
+ return this.$t('status.active')
},
distlistStatusClass(list) {
if (list.isDeleted) {
@@ -322,18 +315,18 @@
},
distlistStatusText(list) {
if (list.isDeleted) {
- return 'Deleted'
+ return this.$t('status.deleted')
}
if (list.isSuspended) {
- return 'Suspended'
+ return this.$t('status.suspended')
}
if (!list.isLdapReady) {
- return 'Not Ready'
+ return this.$t('status.notready')
}
- return 'Active'
+ return this.$t('status.active')
},
pageName(path) {
let page = this.$route.path
@@ -356,6 +349,7 @@
// FIXME: Find a nicer way of doing this
if (!dialog.length) {
+ SupportForm.i18n = i18n
let form = new Vue(SupportForm)
form.$mount($('<div>').appendTo(container)[0])
form.$root = this
@@ -384,18 +378,18 @@
},
userStatusText(user) {
if (user.isDeleted) {
- return 'Deleted'
+ return this.$t('status.deleted')
}
if (user.isSuspended) {
- return 'Suspended'
+ return this.$t('status.suspended')
}
if (!user.isImapReady || !user.isLdapReady) {
- return 'Not Ready'
+ return this.$t('status.notready')
}
- return 'Active'
+ return this.$t('status.active')
},
updateBodyClass(name) {
// Add 'class' attribute to the body, different for each page
@@ -514,7 +508,7 @@
error_msg = error.request ? error.request.statusText : error.message
}
- app.$toast.error(error_msg || "Server Error")
+ app.$toast.error(error_msg || app.$t('error.server'))
// Pass the error as-is
return Promise.reject(error)
diff --git a/src/resources/lang/de/ui.php b/src/resources/lang/de/ui.php
--- a/src/resources/lang/de/ui.php
+++ b/src/resources/lang/de/ui.php
@@ -2,7 +2,7 @@
return [
- 'button' => [
+ 'btn' => [
'cancel' => "Stornieren",
'save' => "Speichern",
],
diff --git a/src/resources/lang/en/ui.php b/src/resources/lang/en/ui.php
--- a/src/resources/lang/en/ui.php
+++ b/src/resources/lang/en/ui.php
@@ -8,19 +8,46 @@
return [
- 'button' => [
+ 'app' => [
+ 'faq' => "FAQ",
+ ],
+
+ 'btn' => [
+ 'add' => "Add",
'accept' => "Accept",
'back' => "Back",
'cancel' => "Cancel",
'close' => "Close",
'continue' => "Continue",
+ 'delete' => "Delete",
'deny' => "Deny",
+ 'download' => "Download",
+ 'edit' => "Edit",
+ 'file' => "Choose file...",
+ 'moreinfo' => "More information",
+ 'refresh' => "Refresh",
+ 'reset' => "Reset",
+ 'resend' => "Resend",
'save' => "Save",
+ 'search' => "Search",
+ 'signup' => "Sign Up",
'submit' => "Submit",
+ 'suspend' => "Suspend",
+ 'unsuspend' => "Unsuspend",
+ 'verify' => "Verify",
],
'dashboard' => [
'beta' => "beta",
+ 'distlists' => "Distribution lists",
+ 'chat' => "Video chat",
+ 'domains' => "Domains",
+ 'invitations' => "Invitations",
+ 'profile' => "Your profile",
+ 'users' => "User accounts",
+ 'wallet' => "Wallet",
+ 'webmail' => "Webmail",
+ 'stats' => "Stats",
],
'distlist' => [
@@ -33,13 +60,72 @@
'recipients' => "Recipients",
],
+ 'domain' => [
+ 'dns-verify' => "Domain DNS verification sample:",
+ 'dns-config' => "Domain DNS configuration sample:",
+ 'namespace' => "Namespace",
+ 'verify' => "Domain verification",
+ 'verify-intro' => "In order to confirm that you're the actual holder of the domain, we need to run a verification process before finally activating it for email delivery.",
+ 'verify-dns' => "The domain <b>must have one of the following entries</b> in DNS:",
+ 'verify-dns-txt' => "TXT entry with value:",
+ 'verify-dns-cname' => "or CNAME entry:",
+ 'verify-outro' => "When this is done press the button below to start the verification.",
+ 'verify-sample' => "Here's a sample zone file for your domain:",
+ 'config' => "Domain configuration",
+ 'config-intro' => "In order to let {app} receive email traffic for your domain you need to adjust the DNS settings, more precisely the MX entries, accordingly.",
+ 'config-sample' => "Edit your domain's zone file and replace existing MX entries with the following values:",
+ 'config-hint' => "If you don't know how to set DNS entries for your domain, please contact the registration service where you registered the domain or your web hosting provider.",
+ ],
+
+ 'error' => [
+ '400' => "Bad request",
+ '401' => "Unauthorized",
+ '403' => "Access denied",
+ '404' => "Not found",
+ '405' => "Method not allowed",
+ '500' => "Internal server error",
+ 'unknown' => "Unknown Error",
+ 'server' => "Server Error",
+ ],
+
'form' => [
+ 'amount' => "Amount",
'code' => "Confirmation Code",
+ 'config' => "Configuration",
+ 'date' => "Date",
+ 'description' => "Description",
+ 'details' => "Details",
+ 'domain' => "Domain",
'email' => "Email Address",
+ 'firstname' => "First Name",
+ 'lastname' => "Last Name",
'none' => "none",
+ 'or' => "or",
'password' => "Password",
'password-confirm' => "Confirm Password",
+ 'phone' => "Phone",
'status' => "Status",
+ 'surname' => "Surname",
+ 'user' => "User",
+ 'primary-email' => "Primary Email",
+ 'id' => "ID",
+ 'created' => "Created",
+ 'deleted' => "Deleted",
+ ],
+
+ 'invitation' => [
+ 'create' => "Create invite(s)",
+ 'create-title' => "Invite for a signup",
+ 'create-email' => "Enter an email address of the person you want to invite.",
+ 'create-csv' => "To send multiple invitations at once, provide a CSV (comma separated) file, or alternatively a plain-text file, containing one email address per line.",
+ 'empty-list' => "There are no invitations in the database.",
+ 'title' => "Signup invitations",
+ 'search' => "Email address or domain",
+ 'send' => "Send invite(s)",
+ 'status-completed' => "User signed up",
+ 'status-failed' => "Sending failed",
+ 'status-sent' => "Sent",
+ 'status-new' => "Not sent yet",
],
'lang' => [
@@ -159,11 +245,18 @@
],
'msg' => [
+ 'initializing' => "Initializing...",
'loading' => "Loading...",
+ 'loading-failed' => "Failed to load data.",
'notfound' => "Resource not found.",
+ 'info' => "Information",
+ 'error' => "Error",
+ 'warning' => "Warning",
+ 'success' => "Success",
],
'nav' => [
+ 'more' => "Load more",
'step' => "Step {i}/{n}",
],
@@ -175,4 +268,140 @@
. " Enter the code we sent you, or click the link in the message.",
],
+ 'signup' => [
+ 'email' => "Existing Email Address",
+ 'login' => "Login",
+ 'title' => "Sign Up",
+ 'step1' => "Sign up to start your free month.",
+ 'step2' => "We sent out a confirmation code to your email address. Enter the code we sent you, or click the link in the message.",
+ 'step3' => "Create your Kolab identity (you can choose additional addresses later).",
+ 'voucher' => "Voucher Code",
+ ],
+
+ 'status' => [
+ 'prepare-account' => "We are preparing your account.",
+ 'prepare-domain' => "We are preparing the domain.",
+ 'prepare-distlist' => "We are preparing the distribution list.",
+ 'prepare-user' => "We are preparing the user account.",
+ 'prepare-hint' => "Some features may be missing or readonly at the moment.",
+ 'prepare-refresh' => "The process never ends? Press the \"Refresh\" button, please.",
+ 'ready-account' => "Your account is almost ready.",
+ 'ready-domain' => "The domain is almost ready.",
+ 'ready-distlist' => "The distribution list is almost ready.",
+ 'ready-user' => "The user account is almost ready.",
+ 'verify' => "Verify your domain to finish the setup process.",
+ 'verify-domain' => "Verify domain",
+ 'deleted' => "Deleted",
+ 'suspended' => "Suspended",
+ 'notready' => "Not Ready",
+ 'active' => "Active",
+ ],
+
+ 'support' => [
+ 'title' => "Contact Support",
+ 'id' => "Customer number or email address you have with us",
+ 'id-pl' => "e.g. 12345678 or john@kolab.org",
+ 'id-hint' => "Leave blank if you are not a customer yet",
+ 'name' => "Name",
+ 'name-pl' => "how we should call you in our reply",
+ 'email' => "Working email address",
+ 'email-pl' => "make sure we can reach you at this address",
+ 'summary' => "Issue Summary",
+ 'summary-pl' => "one sentence that summarizes your issue",
+ 'expl' => "Issue Explanation",
+ ],
+
+ 'user' => [
+ '2fa-hint1' => "This will remove 2-Factor Authentication entitlement as well as the user-configured factors.",
+ '2fa-hint2' => "Please, make sure to confirm the user identity properly.",
+ 'address' => "Address",
+ 'aliases' => "Aliases",
+ 'aliases-email' => "Email Aliases",
+ 'aliases-none' => "This user has no email aliases.",
+ 'add-bonus' => "Add bonus",
+ 'add-bonus-title' => "Add a bonus to the wallet",
+ 'add-penalty' => "Add penalty",
+ 'add-penalty-title' => "Add a penalty to the wallet",
+ 'auto-payment' => "Auto-payment",
+ 'auto-payment-text' => "Fill up by <b>{amount} CHF</b> when under <b>{balance} CHF</b> using {method}",
+ 'country' => "Country",
+ 'create' => "Create user",
+ 'custno' => "Customer No.",
+ 'delete' => "Delete user",
+ 'delete-email' => "Delete {email}",
+ 'delete-text' => "Do you really want to delete this user permanently?"
+ . " This will delete all account data and withdraw the permission to access the email account."
+ . " Please note that this action cannot be undone.",
+ 'discount' => "Discount",
+ 'discount-hint' => "applied discount",
+ 'discount-title' => "Account discount",
+ 'distlists' => "Distribution lists",
+ 'distlists-none' => "There are no distribution lists in this account.",
+ 'domains' => "Domains",
+ 'domains-none' => "There are no domains in this account.",
+ 'ext-email' => "External Email",
+ 'finances' => "Finances",
+ 'list-title' => "User accounts",
+ 'managed-by' => "Managed by",
+ 'new' => "New user account",
+ 'org' => "Organization",
+ 'package' => "Package",
+ 'price' => "Price",
+ 'profile-title' => "Your profile",
+ 'profile-delete' => "Delete account",
+ 'profile-delete-title' => "Delete this account?",
+ 'profile-delete-text1' => "This will delete the account as well as all domains, users and aliases associated with this account.",
+ 'profile-delete-warning' => "This operation is irreversible",
+ 'profile-delete-text2' => "As you will not be able to recover anything after this point, please make sure that you have migrated all data before proceeding.",
+ 'profile-delete-support' => "As we always strive to improve, we would like to ask for 2 minutes of your time. "
+ . "The best tool for improvement is feedback from users, and we would like to ask "
+ . "for a few words about your reasons for leaving our service. Please send your feedback to <a href=\"{href}\">{email}</a>.",
+ 'profile-delete-contact' => "Also feel free to contact {app} Support with any questions or concerns that you may have in this context.",
+ 'reset-2fa' => "Reset 2-Factor Auth",
+ 'reset-2fa-title' => "2-Factor Authentication Reset",
+ 'title' => "User account",
+ 'search-pl' => "User ID, email or domain",
+ 'skureq' => "{sku} requires {list}.",
+ 'subscription' => "Subscription",
+ 'subscriptions' => "Subscriptions",
+ 'subscriptions-none' => "This user has no subscriptions.",
+ 'users' => "Users",
+ 'users-none' => "There are no users in this account.",
+ ],
+
+ 'wallet' => [
+ 'add-credit' => "Add credit",
+ 'auto-payment-cancel' => "Cancel auto-payment",
+ 'auto-payment-change' => "Change auto-payment",
+ 'auto-payment-failed' => "The setup of automatic payments failed. Restart the process to enable automatic top-ups.",
+ 'auto-payment-hint' => "Here is how it works: Every time your account runs low, we will charge your preferred payment method for an amount you choose."
+ . " You can cancel or change the auto-payment option at any time.",
+ 'auto-payment-setup' => "Set up auto-payment",
+ 'auto-payment-disabled' => "The configured auto-payment has been disabled. Top up your wallet or raise the auto-payment amount.",
+ 'auto-payment-info' => "Auto-payment is <b>set</b> to fill up your account by <b>{amount} CHF</b> every time your account balance gets under <b>{balance} CHF</b>.",
+ 'auto-payment-inprogress' => "The setup of the automatic payment is still in progress.",
+ 'auto-payment-next' => "Next, you will be redirected to the checkout page, where you can provide your credit card details.",
+ 'auto-payment-disabled-next' => "The auto-payment is disabled. Immediately after you submit new settings we'll enable it and attempt to top up your wallet.",
+ 'auto-payment-update' => "Update auto-payment",
+ 'banktransfer-hint' => "Please note that a bank transfer can take several days to complete.",
+ 'currency-conv' => "Here is how it works: You specify the amount by which you want to top up your wallet in {wc}."
+ . " We will then convert this to {pc}, and on the next page you will be provided with the bank-details to transfer the amount in {pc}.",
+ 'fill-up' => "Fill up by",
+ 'history' => "History",
+ 'noperm' => "Only account owners can access a wallet.",
+ 'payment-amount-hint' => "Choose the amount by which you want to top up your wallet.",
+ 'payment-method' => "Method of payment: {method}",
+ 'payment-warning' => "You will be charged for {price}.",
+ 'pending-payments' => "Pending Payments",
+ 'pending-payments-warning' => "You have payments that are still in progress. See the \"Pending Payments\" tab below.",
+ 'pending-payments-none' => "There are no pending payments for this account.",
+ 'receipts' => "Receipts",
+ 'receipts-hint' => "Here you can download receipts (in PDF format) for payments in specified period. Select the period and press the Download button.",
+ 'receipts-none' => "There are no receipts for payments in this account. Please, note that you can download receipts after the month ends.",
+ 'title' => "Account balance",
+ 'top-up' => "Top up your wallet",
+ 'transactions' => "Transactions",
+ 'transactions-none' => "There are no transactions for this account.",
+ 'when-below' => "when account balance is below",
+ ],
];
diff --git a/src/resources/vue/Admin/Dashboard.vue b/src/resources/vue/Admin/Dashboard.vue
--- a/src/resources/vue/Admin/Dashboard.vue
+++ b/src/resources/vue/Admin/Dashboard.vue
@@ -3,7 +3,7 @@
<user-search></user-search>
<div id="dashboard-nav" class="mt-3">
<router-link class="card link-stats" :to="{ name: 'stats' }">
- <svg-icon icon="chart-line"></svg-icon><span class="name">Stats</span>
+ <svg-icon icon="chart-line"></svg-icon><span class="name">{{ $t('dashboard.stats') }}</span>
</router-link>
</div>
</div>
diff --git a/src/resources/vue/Admin/Distlist.vue b/src/resources/vue/Admin/Distlist.vue
--- a/src/resources/vue/Admin/Distlist.vue
+++ b/src/resources/vue/Admin/Distlist.vue
@@ -6,7 +6,9 @@
<div class="card-text">
<form class="read-only short">
<div class="form-group row">
- <label for="distlistid" class="col-sm-4 col-form-label">ID <span class="text-muted">(Created at)</span></label>
+ <label for="distlistid" class="col-sm-4 col-form-label">
+ {{ $t('form.id') }} <span class="text-muted">({{ $t('form.created') }})</span>
+ </label>
<div class="col-sm-8">
<span class="form-control-plaintext" id="distlistid">
{{ list.id }} <span class="text-muted">({{ list.created_at }})</span>
@@ -14,13 +16,13 @@
</div>
</div>
<div class="form-group row">
- <label for="status" class="col-sm-4 col-form-label">Status</label>
+ <label for="status" class="col-sm-4 col-form-label">{{ $t('form.status') }}</label>
<div class="col-sm-8">
<span :class="$root.distlistStatusClass(list) + ' form-control-plaintext'" id="status">{{ $root.distlistStatusText(list) }}</span>
</div>
</div>
<div class="form-group row">
- <label for="members-input" class="col-sm-4 col-form-label">Recipients</label>
+ <label for="members-input" class="col-sm-4 col-form-label">{{ $t('distlist.recipients') }}</label>
<div class="col-sm-8">
<span class="form-control-plaintext" id="members">
<span v-for="member in list.members" :key="member">{{ member }}<br></span>
@@ -29,8 +31,12 @@
</div>
</form>
<div class="mt-2">
- <button v-if="!list.isSuspended" id="button-suspend" class="btn btn-warning" type="button" @click="suspendList">Suspend</button>
- <button v-if="list.isSuspended" id="button-unsuspend" class="btn btn-warning" type="button" @click="unsuspendList">Unsuspend</button>
+ <button v-if="!list.isSuspended" id="button-suspend" class="btn btn-warning" type="button" @click="suspendList">
+ {{ $t('btn.suspend') }}
+ </button>
+ <button v-if="list.isSuspended" id="button-unsuspend" class="btn btn-warning" type="button" @click="unsuspendList">
+ {{ $t('btn.unsuspend') }}
+ </button>
</div>
</div>
</div>
diff --git a/src/resources/vue/Admin/Domain.vue b/src/resources/vue/Admin/Domain.vue
--- a/src/resources/vue/Admin/Domain.vue
+++ b/src/resources/vue/Admin/Domain.vue
@@ -6,7 +6,9 @@
<div class="card-text">
<form class="read-only short">
<div class="form-group row">
- <label for="domainid" class="col-sm-4 col-form-label">ID <span class="text-muted">(Created at)</span></label>
+ <label for="domainid" class="col-sm-4 col-form-label">
+ {{ $t('form.id') }} <span class="text-muted">({{ $t('form.created') }})</span>
+ </label>
<div class="col-sm-8">
<span class="form-control-plaintext" id="domainid">
{{ domain.id }} <span class="text-muted">({{ domain.created_at }})</span>
@@ -14,7 +16,7 @@
</div>
</div>
<div class="form-group row">
- <label for="first_name" class="col-sm-4 col-form-label">Status</label>
+ <label for="first_name" class="col-sm-4 col-form-label">{{ $t('form.status') }}</label>
<div class="col-sm-8">
<span class="form-control-plaintext" id="status">
<span :class="$root.domainStatusClass(domain)">{{ $root.domainStatusText(domain) }}</span>
@@ -23,8 +25,12 @@
</div>
</form>
<div class="mt-2">
- <button v-if="!domain.isSuspended" id="button-suspend" class="btn btn-warning" type="button" @click="suspendDomain">Suspend</button>
- <button v-if="domain.isSuspended" id="button-unsuspend" class="btn btn-warning" type="button" @click="unsuspendDomain">Unsuspend</button>
+ <button v-if="!domain.isSuspended" id="button-suspend" class="btn btn-warning" type="button" @click="suspendDomain">
+ {{ $t('btn.suspend') }}
+ </button>
+ <button v-if="domain.isSuspended" id="button-unsuspend" class="btn btn-warning" type="button" @click="unsuspendDomain">
+ {{ $t('btn.unsuspend') }}
+ </button>
</div>
</div>
</div>
@@ -32,7 +38,7 @@
<ul class="nav nav-tabs mt-3" role="tablist">
<li class="nav-item">
<a class="nav-link active" id="tab-config" href="#domain-config" role="tab" aria-controls="domain-config" aria-selected="true">
- Configuration
+ {{ $t('form.config') }}
</a>
</li>
</ul>
@@ -40,9 +46,9 @@
<div class="tab-pane show active" id="domain-config" role="tabpanel" aria-labelledby="tab-config">
<div class="card-body">
<div class="card-text">
- <p>Domain DNS verification sample:</p>
+ <p>{{ $t('domain.dns-verify') }}</p>
<p><pre id="dns-verify">{{ domain.dns.join("\n") }}</pre></p>
- <p>Domain DNS configuration sample:</p>
+ <p>{{ $t('domain.dns-config') }}</p>
<p><pre id="dns-config">{{ domain.config.join("\n") }}</pre></p>
</div>
</div>
diff --git a/src/resources/vue/Admin/Stats.vue b/src/resources/vue/Admin/Stats.vue
--- a/src/resources/vue/Admin/Stats.vue
+++ b/src/resources/vue/Admin/Stats.vue
@@ -1,6 +1,5 @@
<template>
- <div id="stats-container" class="container">
- </div>
+ <div id="stats-container" class="container"></div>
</template>
<script>
@@ -39,7 +38,7 @@
.catch(error => {
console.error(error)
this.$root.removeLoader(chart)
- chart.append($('<span>').text('Failed to load data.'))
+ chart.append($('<span>').text(this.$t('msg.loading-failed')))
})
}
}
diff --git a/src/resources/vue/Admin/User.vue b/src/resources/vue/Admin/User.vue
--- a/src/resources/vue/Admin/User.vue
+++ b/src/resources/vue/Admin/User.vue
@@ -6,7 +6,7 @@
<div class="card-text">
<form class="read-only short">
<div v-if="user.wallet.user_id != user.id" class="form-group row plaintext">
- <label for="manager" class="col-sm-4 col-form-label">Managed by</label>
+ <label for="manager" class="col-sm-4 col-form-label">{{ $t('user.managed-by') }}</label>
<div class="col-sm-8">
<span class="form-control-plaintext" id="manager">
<router-link :to="{ path: '/user/' + user.wallet.user_id }">{{ user.wallet.user_email }}</router-link>
@@ -14,7 +14,7 @@
</div>
</div>
<div class="form-group row plaintext">
- <label for="userid" class="col-sm-4 col-form-label">ID <span class="text-muted">(Created at)</span></label>
+ <label for="userid" class="col-sm-4 col-form-label">ID <span class="text-muted">({{ $t('form.created') }})</span></label>
<div class="col-sm-8">
<span class="form-control-plaintext" id="userid">
{{ user.id }} <span class="text-muted">({{ user.created_at }})</span>
@@ -22,7 +22,7 @@
</div>
</div>
<div class="form-group row plaintext">
- <label for="status" class="col-sm-4 col-form-label">Status</label>
+ <label for="status" class="col-sm-4 col-form-label">{{ $t('form.status') }}</label>
<div class="col-sm-8">
<span class="form-control-plaintext" id="status">
<span :class="$root.userStatusClass(user)">{{ $root.userStatusText(user) }}</span>
@@ -30,54 +30,58 @@
</div>
</div>
<div class="form-group row plaintext" v-if="user.first_name">
- <label for="first_name" class="col-sm-4 col-form-label">First name</label>
+ <label for="first_name" class="col-sm-4 col-form-label">{{ $t('form.firstname') }}</label>
<div class="col-sm-8">
<span class="form-control-plaintext" id="first_name">{{ user.first_name }}</span>
</div>
</div>
<div class="form-group row plaintext" v-if="user.last_name">
- <label for="last_name" class="col-sm-4 col-form-label">Last name</label>
+ <label for="last_name" class="col-sm-4 col-form-label">{{ $t('form.lastname') }}</label>
<div class="col-sm-8">
<span class="form-control-plaintext" id="last_name">{{ user.last_name }}</span>
</div>
</div>
<div class="form-group row plaintext" v-if="user.organization">
- <label for="organization" class="col-sm-4 col-form-label">Organization</label>
+ <label for="organization" class="col-sm-4 col-form-label">{{ $t('user.org') }}</label>
<div class="col-sm-8">
<span class="form-control-plaintext" id="organization">{{ user.organization }}</span>
</div>
</div>
<div class="form-group row plaintext" v-if="user.phone">
- <label for="phone" class="col-sm-4 col-form-label">Phone</label>
+ <label for="phone" class="col-sm-4 col-form-label">{{ $t('form.phone') }}</label>
<div class="col-sm-8">
<span class="form-control-plaintext" id="phone">{{ user.phone }}</span>
</div>
</div>
<div class="form-group row plaintext">
- <label for="external_email" class="col-sm-4 col-form-label">External email</label>
+ <label for="external_email" class="col-sm-4 col-form-label">{{ $t('user.ext-email') }}</label>
<div class="col-sm-8">
<span class="form-control-plaintext" id="external_email">
<a v-if="user.external_email" :href="'mailto:' + user.external_email">{{ user.external_email }}</a>
- <button type="button" class="btn btn-secondary btn-sm" @click="emailEdit">Edit</button>
+ <button type="button" class="btn btn-secondary btn-sm" @click="emailEdit">{{ $t('btn.edit') }}</button>
</span>
</div>
</div>
<div class="form-group row plaintext" v-if="user.billing_address">
- <label for="billing_address" class="col-sm-4 col-form-label">Address</label>
+ <label for="billing_address" class="col-sm-4 col-form-label">{{ $t('user.address') }}</label>
<div class="col-sm-8">
<span class="form-control-plaintext" style="white-space:pre" id="billing_address">{{ user.billing_address }}</span>
</div>
</div>
<div class="form-group row plaintext">
- <label for="country" class="col-sm-4 col-form-label">Country</label>
+ <label for="country" class="col-sm-4 col-form-label">{{ $t('user.country') }}</label>
<div class="col-sm-8">
<span class="form-control-plaintext" id="country">{{ user.country }}</span>
</div>
</div>
</form>
<div class="mt-2">
- <button v-if="!user.isSuspended" id="button-suspend" class="btn btn-warning" type="button" @click="suspendUser">Suspend</button>
- <button v-if="user.isSuspended" id="button-unsuspend" class="btn btn-warning" type="button" @click="unsuspendUser">Unsuspend</button>
+ <button v-if="!user.isSuspended" id="button-suspend" class="btn btn-warning" type="button" @click="suspendUser">
+ {{ $t('btn.suspend') }}
+ </button>
+ <button v-if="user.isSuspended" id="button-unsuspend" class="btn btn-warning" type="button" @click="unsuspendUser">
+ {{ $t('btn.unsuspend') }}
+ </button>
</div>
</div>
</div>
@@ -85,74 +89,80 @@
<ul class="nav nav-tabs mt-3" role="tablist">
<li class="nav-item">
<a class="nav-link active" id="tab-finances" href="#user-finances" role="tab" aria-controls="user-finances" aria-selected="true">
- Finances
+ {{ $t('user.finances') }}
</a>
</li>
<li class="nav-item">
<a class="nav-link" id="tab-aliases" href="#user-aliases" role="tab" aria-controls="user-aliases" aria-selected="false">
- Aliases ({{ user.aliases.length }})
+ {{ $t('user.aliases') }} ({{ user.aliases.length }})
</a>
</li>
<li class="nav-item">
<a class="nav-link" id="tab-subscriptions" href="#user-subscriptions" role="tab" aria-controls="user-subscriptions" aria-selected="false">
- Subscriptions ({{ skus.length }})
+ {{ $t('user.subscriptions') }} ({{ skus.length }})
</a>
</li>
<li class="nav-item">
<a class="nav-link" id="tab-domains" href="#user-domains" role="tab" aria-controls="user-domains" aria-selected="false">
- Domains ({{ domains.length }})
+ {{ $t('user.domains') }} ({{ domains.length }})
</a>
</li>
<li class="nav-item">
<a class="nav-link" id="tab-users" href="#user-users" role="tab" aria-controls="user-users" aria-selected="false">
- Users ({{ users.length }})
+ {{ $t('user.users') }} ({{ users.length }})
</a>
</li>
<li class="nav-item">
<a class="nav-link" id="tab-distlists" href="#user-distlists" role="tab" aria-controls="user-distlists" aria-selected="false">
- Distribution lists ({{ distlists.length }})
+ {{ $t('user.distlists') }} ({{ distlists.length }})
</a>
</li>
</ul>
<div class="tab-content">
<div class="tab-pane show active" id="user-finances" role="tabpanel" aria-labelledby="tab-finances">
<div class="card-body">
- <h2 class="card-title">Account balance <span :class="wallet.balance < 0 ? 'text-danger' : 'text-success'"><strong>{{ $root.price(wallet.balance) }}</strong></span></h2>
+ <h2 class="card-title">
+ {{ $t('wallet.title') }}
+ <span :class="wallet.balance < 0 ? 'text-danger' : 'text-success'"><strong>{{ $root.price(wallet.balance) }}</strong></span>
+ </h2>
<div class="card-text">
<form class="read-only short">
<div class="form-group row">
- <label class="col-sm-4 col-form-label">Discount</label>
+ <label class="col-sm-4 col-form-label">{{ $t('user.discount') }}</label>
<div class="col-sm-8">
<span class="form-control-plaintext" id="discount">
<span>{{ wallet.discount ? (wallet.discount + '% - ' + wallet.discount_description) : 'none' }}</span>
- <button type="button" class="btn btn-secondary btn-sm" @click="discountEdit">Edit</button>
+ <button type="button" class="btn btn-secondary btn-sm" @click="discountEdit">{{ $t('btn.edit') }}</button>
</span>
</div>
</div>
<div class="form-group row" v-if="wallet.mandate && wallet.mandate.id">
- <label class="col-sm-4 col-form-label">Auto-payment</label>
+ <label class="col-sm-4 col-form-label">{{ $t('user.auto-payment') }}</label>
<div class="col-sm-8">
- <span id="autopayment" :class="'form-control-plaintext' + (wallet.mandateState ? ' text-danger' : '')">
- Fill up by <b>{{ wallet.mandate.amount }} CHF</b>
- when under <b>{{ wallet.mandate.balance }} CHF</b>
- using {{ wallet.mandate.method }}
+ <span id="autopayment" :class="'form-control-plaintext' + (wallet.mandateState ? ' text-danger' : '')"
+ v-html="$t('user.auto-payment-text', {
+ amount: wallet.mandate.amount,
+ balance: wallet.mandate.balance,
+ method: wallet.mandate.method
+ })"
+ >
<span v-if="wallet.mandateState">({{ wallet.mandateState }})</span>.
</span>
</div>
</div>
<div class="form-group row" v-if="wallet.providerLink">
- <label class="col-sm-4 col-form-label">{{ capitalize(wallet.provider) }} ID</label>
+ <label class="col-sm-4 col-form-label">{{ capitalize(wallet.provider) }} {{ $t('form.id') }}</label>
<div class="col-sm-8">
<span class="form-control-plaintext" v-html="wallet.providerLink"></span>
</div>
</div>
</form>
<div class="mt-2">
- <button id="button-award" class="btn btn-success" type="button" @click="awardDialog">Add bonus</button>
- <button id="button-penalty" class="btn btn-danger" type="button" @click="penalizeDialog">Add penalty</button>
+ <button id="button-award" class="btn btn-success" type="button" @click="awardDialog">{{ $t('user.add-bonus') }}</button>
+ <button id="button-penalty" class="btn btn-danger" type="button" @click="penalizeDialog">{{ $t('user.add-penalty') }}</button>
</div>
</div>
- <h2 class="card-title mt-4">Transactions</h2>
+ <h2 class="card-title mt-4">{{ $t('wallet.transactions') }}</h2>
<transaction-log v-if="wallet.id && !walletReload" class="card-text" :wallet-id="wallet.id" :is-admin="true"></transaction-log>
</div>
</div>
@@ -162,7 +172,7 @@
<table class="table table-sm table-hover">
<thead class="thead-light">
<tr>
- <th scope="col">Email address</th>
+ <th scope="col">{{ $t('form.email') }}</th>
</tr>
</thead>
<tbody>
@@ -172,7 +182,7 @@
</tbody>
<tfoot class="table-fake-body">
<tr>
- <td>This user has no email aliases.</td>
+ <td>{{ $t('user.aliases-none') }}</td>
</tr>
</tfoot>
</table>
@@ -185,8 +195,8 @@
<table class="table table-sm table-hover mb-0">
<thead class="thead-light">
<tr>
- <th scope="col">Subscription</th>
- <th scope="col">Price</th>
+ <th scope="col">{{ $t('user.subscription') }}</th>
+ <th scope="col">{{ $t('user.price') }}</th>
</tr>
</thead>
<tbody>
@@ -197,16 +207,18 @@
</tbody>
<tfoot class="table-fake-body">
<tr>
- <td colspan="2">This user has no subscriptions.</td>
+ <td colspan="2">{{ $t('user.subscriptions-none') }}</td>
</tr>
</tfoot>
</table>
<small v-if="discount > 0" class="hint">
<hr class="m-0">
- &sup1; applied discount: {{ discount }}% - {{ discount_description }}
+ &sup1; {{ $t('user.discount-hint') }}: {{ discount }}% - {{ discount_description }}
</small>
<div class="mt-2">
- <button type="button" class="btn btn-danger" id="reset2fa" v-if="has2FA" @click="reset2FADialog">Reset 2-Factor Auth</button>
+ <button type="button" class="btn btn-danger" id="reset2fa" v-if="has2FA" @click="reset2FADialog">
+ {{ $t('user.reset-2fa') }}
+ </button>
</div>
</div>
</div>
@@ -217,7 +229,7 @@
<table class="table table-sm table-hover">
<thead class="thead-light">
<tr>
- <th scope="col">Name</th>
+ <th scope="col">{{ $t('domain.namespace') }}</th>
</tr>
</thead>
<tbody>
@@ -230,7 +242,7 @@
</tbody>
<tfoot class="table-fake-body">
<tr>
- <td>There are no domains in this account.</td>
+ <td>{{ $t('user.domains-none') }}</td>
</tr>
</tfoot>
</table>
@@ -243,7 +255,7 @@
<table class="table table-sm table-hover">
<thead class="thead-light">
<tr>
- <th scope="col">Primary Email</th>
+ <th scope="col">{{ $t('form.primary-email') }}</th>
</tr>
</thead>
<tbody>
@@ -257,7 +269,7 @@
</tbody>
<tfoot class="table-fake-body">
<tr>
- <td>There are no users in this account.</td>
+ <td>{{ $t('user.users-none') }}</td>
</tr>
</tfoot>
</table>
@@ -270,7 +282,7 @@
<table class="table table-sm table-hover">
<thead class="thead-light">
<tr>
- <th scope="col">Email address</th>
+ <th scope="col">{{ $t('form.email') }}</th>
</tr>
</thead>
<tbody>
@@ -283,7 +295,7 @@
</tbody>
<tfoot class="table-fake-body">
<tr>
- <td>There are no distribution lists in this account.</td>
+ <td>{{ $t('user.distlists-none') }}</td>
</tr>
</tfoot>
</table>
@@ -296,23 +308,23 @@
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
- <h5 class="modal-title">Account discount</h5>
- <button type="button" class="close" data-dismiss="modal" aria-label="Close">
+ <h5 class="modal-title">{{ $t('user.discount-title') }}</h5>
+ <button type="button" class="close" data-dismiss="modal" :aria-label="$t('btn.close')">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<p class="form-group">
<select v-model="wallet.discount_id" class="custom-select">
- <option value="">- none -</option>
+ <option value="">- {{ $t('form.none') }} -</option>
<option v-for="item in discounts" :value="item.id" :key="item.id">{{ item.label }}</option>
</select>
</p>
</div>
<div class="modal-footer">
- <button type="button" class="btn btn-secondary modal-cancel" data-dismiss="modal">Cancel</button>
+ <button type="button" class="btn btn-secondary modal-cancel" data-dismiss="modal">{{ $t('btn.cancel') }}</button>
<button type="button" class="btn btn-primary modal-action" @click="submitDiscount()">
- <svg-icon icon="check"></svg-icon> Submit
+ <svg-icon icon="check"></svg-icon> {{ $t('btn.submit') }}
</button>
</div>
</div>
@@ -323,8 +335,8 @@
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
- <h5 class="modal-title">External email</h5>
- <button type="button" class="close" data-dismiss="modal" aria-label="Close">
+ <h5 class="modal-title">{{ $t('user.ext-email') }}</h5>
+ <button type="button" class="close" data-dismiss="modal" :aria-label="$t('btn.close')">
<span aria-hidden="true">&times;</span>
</button>
</div>
@@ -334,9 +346,9 @@
</p>
</div>
<div class="modal-footer">
- <button type="button" class="btn btn-secondary modal-cancel" data-dismiss="modal">Cancel</button>
+ <button type="button" class="btn btn-secondary modal-cancel" data-dismiss="modal">{{ $t('btn.cancel') }}</button>
<button type="button" class="btn btn-primary modal-action" @click="submitEmail()">
- <svg-icon icon="check"></svg-icon> Submit
+ <svg-icon icon="check"></svg-icon> {{ $t('btn.submit') }}
</button>
</div>
</div>
@@ -347,15 +359,15 @@
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
- <h5 class="modal-title">{{ oneoff_negative ? 'Add a penalty to the wallet' : 'Add a bonus to the wallet' }}</h5>
- <button type="button" class="close" data-dismiss="modal" aria-label="Close">
+ <h5 class="modal-title">{{ $t(oneoff_negative ? 'user.add-penalty-title' : 'user.add-bonus-title') }}</h5>
+ <button type="button" class="close" data-dismiss="modal" :aria-label="$t('btn.close')">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<form data-validation-prefix="oneoff_">
<div class="form-group">
- <label for="oneoff_amount" class="col-form-label">Amount</label>
+ <label for="oneoff_amount" class="col-form-label">{{ $t('form.amount') }}</label>
<div class="input-group">
<input type="text" class="form-control" id="oneoff_amount" v-model="oneoff_amount" required>
<span class="input-group-append">
@@ -364,15 +376,15 @@
</div>
</div>
<div class="form-group">
- <label for="oneoff_description" class="col-form-label">Description</label>
+ <label for="oneoff_description" class="col-form-label">{{ $t('form.description') }}</label>
<input class="form-control" id="oneoff_description" v-model="oneoff_description" required>
</div>
</form>
</div>
<div class="modal-footer">
- <button type="button" class="btn btn-secondary modal-cancel" data-dismiss="modal">Cancel</button>
+ <button type="button" class="btn btn-secondary modal-cancel" data-dismiss="modal">{{ $t('btn.cancel') }}</button>
<button type="button" class="btn btn-primary modal-action" @click="submitOneOff()">
- <svg-icon icon="check"></svg-icon> Submit
+ <svg-icon icon="check"></svg-icon> {{ $t('btn.submit') }}
</button>
</div>
</div>
@@ -383,19 +395,18 @@
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
- <h5 class="modal-title">2-Factor Authentication Reset</h5>
- <button type="button" class="close" data-dismiss="modal" aria-label="Close">
+ <h5 class="modal-title">{{ $t('user.reset-2fa-title') }}</h5>
+ <button type="button" class="close" data-dismiss="modal" :aria-label="$t('btn.close')">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
- <p>This will remove 2-Factor Authentication entitlement as well
- as the user-configured factors.</p>
- <p>Please, make sure to confirm the user identity properly.</p>
+ <p>{{ $t('user.2fa-hint1') }}</p>
+ <p>{{ $t('user.2fa-hint2') }}</p>
</div>
<div class="modal-footer">
- <button type="button" class="btn btn-secondary modal-cancel" data-dismiss="modal">Cancel</button>
- <button type="button" class="btn btn-danger modal-action" @click="reset2FA()">Reset</button>
+ <button type="button" class="btn btn-secondary modal-cancel" data-dismiss="modal">{{ $t('btn.cancel') }}</button>
+ <button type="button" class="btn btn-danger modal-action" @click="reset2FA()">{{ $t('btn.reset') }}</button>
</div>
</div>
</div>
diff --git a/src/resources/vue/App.vue b/src/resources/vue/App.vue
--- a/src/resources/vue/App.vue
+++ b/src/resources/vue/App.vue
@@ -54,7 +54,7 @@
return true
}
- const hint = type == 'wallets' ? "Only account owners can access a wallet." : ''
+ const hint = type == 'wallets' ? this.$t('wallet.noperm') : ''
this.$root.errorPage(403, null, hint)
@@ -76,7 +76,7 @@
const result = response.data.faq
$('#faq').remove()
if (result && result.length) {
- let faq = $('<div id="faq" class="faq mt-3"><h5>FAQ</h5><ul class="pl-4"></ul></div>')
+ let faq = $('<div id="faq" class="faq mt-3"><h5>' + this.$t('app.faq') + '</h5><ul class="pl-4"></ul></div>')
let list = []
result.forEach(item => {
diff --git a/src/resources/vue/Dashboard.vue b/src/resources/vue/Dashboard.vue
--- a/src/resources/vue/Dashboard.vue
+++ b/src/resources/vue/Dashboard.vue
@@ -4,27 +4,27 @@
<div id="dashboard-nav">
<router-link class="card link-profile" :to="{ name: 'profile' }">
- <svg-icon icon="user-cog"></svg-icon><span class="name">Your profile</span>
+ <svg-icon icon="user-cog"></svg-icon><span class="name">{{ $t('dashboard.profile') }}</span>
</router-link>
<router-link v-if="status.enableDomains" class="card link-domains" :to="{ name: 'domains' }">
- <svg-icon icon="globe"></svg-icon><span class="name">Domains</span>
+ <svg-icon icon="globe"></svg-icon><span class="name">{{ $t('dashboard.domains') }}</span>
</router-link>
<router-link v-if="status.enableUsers" class="card link-users" :to="{ name: 'users' }">
- <svg-icon icon="user-friends"></svg-icon><span class="name">User accounts</span>
+ <svg-icon icon="user-friends"></svg-icon><span class="name">{{ $t('dashboard.users') }}</span>
</router-link>
<router-link v-if="status.enableDistlists" class="card link-distlists" :to="{ name: 'distlists' }">
- <svg-icon icon="users"></svg-icon><span class="name">Distribution lists</span>
+ <svg-icon icon="users"></svg-icon><span class="name">{{ $t('dashboard.distlists') }}</span>
</router-link>
<router-link v-if="status.enableWallets" class="card link-wallet" :to="{ name: 'wallet' }">
- <svg-icon icon="wallet"></svg-icon><span class="name">Wallet</span>
+ <svg-icon icon="wallet"></svg-icon><span class="name">{{ $t('dashboard.wallet') }}</span>
<span v-if="balance < 0" class="badge badge-danger">{{ $root.price(balance) }}</span>
</router-link>
<router-link v-if="$root.hasSKU('meet')" class="card link-chat" :to="{ name: 'rooms' }">
- <svg-icon icon="comments"></svg-icon><span class="name">Video chat</span>
- <span class="badge badge-primary">beta</span>
+ <svg-icon icon="comments"></svg-icon><span class="name">{{ $t('dashboard.chat') }}</span>
+ <span class="badge badge-primary">{{ $t('dashboard.beta') }}</span>
</router-link>
<a v-if="webmailURL" class="card link-webmail" :href="webmailURL">
- <svg-icon icon="envelope"></svg-icon><span class="name">Webmail</span>
+ <svg-icon icon="envelope"></svg-icon><span class="name">{{ $t('dashboard.webmail') }}</span>
</a>
</div>
</div>
diff --git a/src/resources/vue/Distlist/Info.vue b/src/resources/vue/Distlist/Info.vue
--- a/src/resources/vue/Distlist/Info.vue
+++ b/src/resources/vue/Distlist/Info.vue
@@ -31,7 +31,7 @@
<list-input id="members" :list="list.members"></list-input>
</div>
</div>
- <button class="btn btn-primary" type="submit"><svg-icon icon="check"></svg-icon> {{ $t('button.submit') }}</button>
+ <button class="btn btn-primary" type="submit"><svg-icon icon="check"></svg-icon> {{ $t('btn.submit') }}</button>
</form>
</div>
</div>
diff --git a/src/resources/vue/Domain/Info.vue b/src/resources/vue/Domain/Info.vue
--- a/src/resources/vue/Domain/Info.vue
+++ b/src/resources/vue/Domain/Info.vue
@@ -4,32 +4,29 @@
<div v-if="domain && !domain.isConfirmed" class="card" id="domain-verify">
<div class="card-body">
- <div class="card-title">Domain verification</div>
+ <div class="card-title">{{ $t('domain.verify') }}</div>
<div class="card-text">
- <p>In order to confirm that you're the actual holder of the domain,
- we need to run a verification process before finally activating it for email delivery.</p>
- <p>The domain <b>must have one of the following entries</b> in DNS:
+ <p>{{ $t('domain.verify-intro') }}</p>
+ <p>
+ <span v-html="$t('domain.verify-dns')"></span>
<ul>
- <li>TXT entry with value: <code>{{ domain.hash_text }}</code></li>
- <li>or CNAME entry: <code>{{ domain.hash_cname }}.{{ domain.namespace }}. IN CNAME {{ domain.hash_code }}.{{ domain.namespace }}.</code></li>
+ <li>{{ $t('domain.verify-dns-txt') }} <code>{{ domain.hash_text }}</code></li>
+ <li>{{ $t('domain.verify-dns-cname') }} <code>{{ domain.hash_cname }}.{{ domain.namespace }}. IN CNAME {{ domain.hash_code }}.{{ domain.namespace }}.</code></li>
</ul>
- When this is done press the button below to start the verification.</p>
- <p>Here's a sample zone file for your domain: <pre>{{ domain.dns.join("\n") }}</pre></p>
- <button class="btn btn-primary" type="button" @click="confirm"><svg-icon icon="sync-alt"></svg-icon> Verify</button>
+ <span>{{ $t('domain.verify-outro') }}</span>
+ </p>
+ <p>{{ $t('domain.verify-sample') }} <pre>{{ domain.dns.join("\n") }}</pre></p>
+ <button class="btn btn-primary" type="button" @click="confirm"><svg-icon icon="sync-alt"></svg-icon> {{ $t('btn.verify') }}</button>
</div>
</div>
</div>
<div v-if="domain && domain.isConfirmed" class="card" id="domain-config">
<div class="card-body">
- <div class="card-title">Domain configuration</div>
+ <div class="card-title">{{ $t('domain.config') }}</div>
<div class="card-text">
- <p>In order to let {{ $root.appName }} receive email traffic for your domain you need to adjust
- the DNS settings, more precisely the MX entries, accordingly.</p>
- <p>Edit your domain's zone file and replace existing MX
- entries with the following values: <pre>{{ domain.config.join("\n") }}</pre></p>
- <p>If you don't know how to set DNS entries for your domain,
- please contact the registration service where you registered
- the domain or your web hosting provider.</p>
+ <p>{{ $t('domain.config-intro', { app: $root.appName }) }}</p>
+ <p>{{ $t('domain.config-sample') }} <pre>{{ domain.config.join("\n") }}</pre></p>
+ <p>{{ $t('domain.config-hint') }}</p>
</div>
</div>
</div>
diff --git a/src/resources/vue/Domain/List.vue b/src/resources/vue/Domain/List.vue
--- a/src/resources/vue/Domain/List.vue
+++ b/src/resources/vue/Domain/List.vue
@@ -2,12 +2,12 @@
<div class="container">
<div class="card" id="domain-list">
<div class="card-body">
- <div class="card-title">Domains</div>
+ <div class="card-title">{{ $t('user.domains') }}</div>
<div class="card-text">
<table class="table table-sm table-hover">
<thead class="thead-light">
<tr>
- <th scope="col">Name</th>
+ <th scope="col">{{ $t('domain.namespace') }}</th>
<th scope="col"></th>
</tr>
</thead>
@@ -22,7 +22,7 @@
</tbody>
<tfoot class="table-fake-body">
<tr>
- <td colspan="2">There are no domains in this account.</td>
+ <td colspan="2">{{ $t('user.domains-none') }}</td>
</tr>
</tfoot>
</table>
diff --git a/src/resources/vue/Meet/Room.vue b/src/resources/vue/Meet/Room.vue
--- a/src/resources/vue/Meet/Room.vue
+++ b/src/resources/vue/Meet/Room.vue
@@ -126,7 +126,7 @@
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">{{ $t('meet.leave-title') }}</h5>
- <button type="button" class="close" data-dismiss="modal" :aria-label="$t('button.close')">
+ <button type="button" class="close" data-dismiss="modal" :aria-label="$t('btn.close')">
<span aria-hidden="true">&times;</span>
</button>
</div>
@@ -134,7 +134,7 @@
<p>{{ $t('meet.leave-body') }}</p>
</div>
<div class="modal-footer">
- <button type="button" class="btn btn-danger modal-action" data-dismiss="modal">{{ $t('button.close') }}</button>
+ <button type="button" class="btn btn-danger modal-action" data-dismiss="modal">{{ $t('btn.close') }}</button>
</div>
</div>
</div>
@@ -145,7 +145,7 @@
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">{{ $t('meet.media-title') }}</h5>
- <button type="button" class="close" data-dismiss="modal" :aria-label="$t('button.close')">
+ <button type="button" class="close" data-dismiss="modal" :aria-label="$t('btn.close')">
<span aria-hidden="true">&times;</span>
</button>
</div>
@@ -173,7 +173,7 @@
</form>
</div>
<div class="modal-footer">
- <button type="button" class="btn btn-secondary modal-action" data-dismiss="modal">{{ $t('button.close') }}</button>
+ <button type="button" class="btn btn-secondary modal-action" data-dismiss="modal">{{ $t('btn.close') }}</button>
</div>
</div>
</div>
@@ -454,8 +454,8 @@
+ `<div class="content">`
+ `<p class="mb-2"></p>`
+ `<div class="text-right">`
- + `<button type="button" class="btn btn-sm btn-success accept">${this.$t('button.accept')}</button>`
- + `<button type="button" class="btn btn-sm btn-danger deny ml-2">${this.$t('button.deny')}</button>`
+ + `<button type="button" class="btn btn-sm btn-success accept">${this.$t('btn.accept')}</button>`
+ + `<button type="button" class="btn btn-sm btn-danger deny ml-2">${this.$t('btn.deny')}</button>`
)
this.$toast.message({
diff --git a/src/resources/vue/Meet/RoomOptions.vue b/src/resources/vue/Meet/RoomOptions.vue
--- a/src/resources/vue/Meet/RoomOptions.vue
+++ b/src/resources/vue/Meet/RoomOptions.vue
@@ -5,7 +5,7 @@
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">{{ $t('meet.options') }}</h5>
- <button type="button" class="close" data-dismiss="modal" :aria-label="$t('button.close')">
+ <button type="button" class="close" data-dismiss="modal" :aria-label="$t('btn.close')">
<span aria-hidden="true">&times;</span>
</button>
</div>
@@ -17,7 +17,7 @@
<span v-else id="password-input-text" class="input-group-text text-muted">{{ $t('meet.password-none') }}</span>
<input type="text" :value="config.password" name="password" class="form-control rounded-left activable">
<div class="input-group-append">
- <button type="button" @click="passwordSave" id="password-save-btn" class="btn btn-outline-primary activable rounded-right">{{ $t('button.save') }}</button>
+ <button type="button" @click="passwordSave" id="password-save-btn" class="btn btn-outline-primary activable rounded-right">{{ $t('btn.save') }}</button>
<button type="button" v-if="config.password" id="password-clear-btn" @click="passwordClear" class="btn btn-outline-danger rounded">{{ $t('meet.password-clear') }}</button>
<button type="button" v-else @click="passwordSet" id="password-set-btn" class="btn btn-outline-primary rounded">{{ $t('meet.password-set') }}</button>
</div>
@@ -48,7 +48,7 @@
</form>
</div>
<div class="modal-footer">
- <button type="button" class="btn btn-secondary modal-action" data-dismiss="modal">{{ $t('button.close') }}</button>
+ <button type="button" class="btn btn-secondary modal-action" data-dismiss="modal">{{ $t('btn.close') }}</button>
</div>
</div>
</div>
diff --git a/src/resources/vue/PasswordReset.vue b/src/resources/vue/PasswordReset.vue
--- a/src/resources/vue/PasswordReset.vue
+++ b/src/resources/vue/PasswordReset.vue
@@ -12,7 +12,7 @@
<label for="reset_email" class="sr-only">{{ $t('form.email') }}</label>
<input type="text" class="form-control" id="reset_email" :placeholder="$t('form.email')" required v-model="email">
</div>
- <button class="btn btn-primary" type="submit"><svg-icon icon="check"></svg-icon> {{ $t('button.continue') }}</button>
+ <button class="btn btn-primary" type="submit"><svg-icon icon="check"></svg-icon> {{ $t('btn.continue') }}</button>
</form>
</div>
</div>
@@ -28,8 +28,8 @@
<label for="reset_short_code" class="sr-only">{{ $t('form.code') }}</label>
<input type="text" class="form-control" id="reset_short_code" :placeholder="$t('form.code')" required v-model="short_code">
</div>
- <button class="btn btn-secondary" type="button" @click="stepBack">{{ $t('button.back') }}</button>
- <button class="btn btn-primary" type="submit"><svg-icon icon="check"></svg-icon> {{ $t('button.continue') }}</button>
+ <button class="btn btn-secondary" type="button" @click="stepBack">{{ $t('btn.back') }}</button>
+ <button class="btn btn-primary" type="submit"><svg-icon icon="check"></svg-icon> {{ $t('btn.continue') }}</button>
<input type="hidden" id="reset_code" v-model="code" />
</form>
</div>
@@ -49,8 +49,8 @@
<label for="reset_confirm" class="sr-only">{{ $t('form.password-confirm') }}</label>
<input type="password" class="form-control" id="reset_confirm" :placeholder="$t('form.password-confirm')" required v-model="password_confirmation">
</div>
- <button class="btn btn-secondary" type="button" @click="stepBack">{{ $t('button.back') }}</button>
- <button class="btn btn-primary" type="submit"><svg-icon icon="check"></svg-icon> {{ $t('button.submit') }}</button>
+ <button class="btn btn-secondary" type="button" @click="stepBack">{{ $t('btn.back') }}</button>
+ <button class="btn btn-primary" type="submit"><svg-icon icon="check"></svg-icon> {{ $t('btn.submit') }}</button>
</form>
</div>
</div>
diff --git a/src/resources/vue/Reseller/Dashboard.vue b/src/resources/vue/Reseller/Dashboard.vue
--- a/src/resources/vue/Reseller/Dashboard.vue
+++ b/src/resources/vue/Reseller/Dashboard.vue
@@ -3,14 +3,14 @@
<user-search></user-search>
<div id="dashboard-nav" class="mt-3">
<router-link v-if="status.enableWallets" class="card link-wallet" :to="{ name: 'wallet' }">
- <svg-icon icon="wallet"></svg-icon><span class="name">Wallet</span>
+ <svg-icon icon="wallet"></svg-icon><span class="name">{{ $t('dashboard.wallet') }}</span>
<span :class="'badge badge-' + (balance < 0 ? 'danger' : 'success')">{{ $root.price(balance) }}</span>
</router-link>
<router-link class="card link-invitations" :to="{ name: 'invitations' }">
- <svg-icon icon="envelope-open-text"></svg-icon><span class="name">Invitations</span>
+ <svg-icon icon="envelope-open-text"></svg-icon><span class="name">{{ $t('dashboard.invitations') }}</span>
</router-link>
<router-link class="card link-stats" :to="{ name: 'stats' }">
- <svg-icon icon="chart-line"></svg-icon><span class="name">Stats</span>
+ <svg-icon icon="chart-line"></svg-icon><span class="name">{{ $t('dashboard.stats') }}</span>
</router-link>
</div>
</div>
diff --git a/src/resources/vue/Reseller/Invitations.vue b/src/resources/vue/Reseller/Invitations.vue
--- a/src/resources/vue/Reseller/Invitations.vue
+++ b/src/resources/vue/Reseller/Invitations.vue
@@ -3,19 +3,19 @@
<div class="card" id="invitations">
<div class="card-body">
<div class="card-title">
- Signup Invitations
+ {{ $t('invitation.title') }}
</div>
<div class="card-text">
<div class="mb-2 d-flex">
<form @submit.prevent="searchInvitations" id="search-form" class="input-group" style="flex:1">
- <input class="form-control" type="text" placeholder="Email address or domain" v-model="search">
+ <input class="form-control" type="text" :placeholder="$t('invitation.search')" v-model="search">
<div class="input-group-append">
- <button type="submit" class="btn btn-primary"><svg-icon icon="search"></svg-icon> Search</button>
+ <button type="submit" class="btn btn-primary"><svg-icon icon="search"></svg-icon> {{ $t('btn.search') }}</button>
</div>
</form>
<div>
<button class="btn btn-success create-invite ml-1" @click="inviteUserDialog">
- <svg-icon icon="envelope-open-text"></svg-icon> Create invite(s)
+ <svg-icon icon="envelope-open-text"></svg-icon> {{ $t('invitation.create') }}
</button>
</div>
</div>
@@ -23,15 +23,15 @@
<table id="invitations-list" class="table table-sm table-hover">
<thead class="thead-light">
<tr>
- <th scope="col">External Email</th>
- <th scope="col">Created</th>
+ <th scope="col">{{ $t('user.ext-email') }}</th>
+ <th scope="col">{{ $t('form.created') }}</th>
<th scope="col"></th>
</tr>
</thead>
<tbody>
<tr v-for="inv in invitations" :id="'i' + inv.id" :key="inv.id">
<td class="email">
- <svg-icon icon="envelope-open-text" :class="statusClass(inv)" :title="statusText(inv)"></svg-icon>
+ <svg-icon icon="envelope-open-text" :class="statusClass(inv)" :title="$t('invitation.status-' + statusLabel(inv))"></svg-icon>
<span>{{ inv.email }}</span>
</td>
<td class="datetime">
@@ -40,23 +40,23 @@
<td class="buttons">
<button class="btn text-danger button-delete p-0 ml-1" @click="deleteInvite(inv.id)">
<svg-icon icon="trash-alt"></svg-icon>
- <span class="btn-label">Delete</span>
+ <span class="btn-label">{{ $t('btn.delete') }}</span>
</button>
<button class="btn button-resend p-0 ml-1" :disabled="inv.isNew || inv.isCompleted" @click="resendInvite(inv.id)">
<svg-icon icon="redo"></svg-icon>
- <span class="btn-label">Resend</span>
+ <span class="btn-label">{{ $t('btn.resend') }}</span>
</button>
</td>
</tr>
</tbody>
<tfoot class="table-fake-body">
<tr>
- <td colspan="3">There are no invitations in the database.</td>
+ <td colspan="3">{{ $t('invitation.empty-list') }}</td>
</tr>
</tfoot>
</table>
<div class="text-center p-3" id="more-loader" v-if="hasMore">
- <button class="btn btn-secondary" @click="loadInvitations(true)">Load more</button>
+ <button class="btn btn-secondary" @click="loadInvitations(true)">{{ $t('nav.more') }}</button>
</div>
</div>
</div>
@@ -66,32 +66,29 @@
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
- <h5 class="modal-title">Invite for a signup</h5>
- <button type="button" class="close" data-dismiss="modal" aria-label="Close">
+ <h5 class="modal-title">{{ $t('invitation.create-title') }}</h5>
+ <button type="button" class="close" data-dismiss="modal" :aria-label="$t('btn.close')">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<form>
- <p>Enter an email address of the person you want to invite.</p>
+ <p>{{ $t('invitation.create-email') }}</p>
<div>
<input id="email" type="text" class="form-control" name="email">
</div>
- <div class="form-separator"><hr><span>or</span></div>
- <p>
- To send multiple invitations at once, provide a CSV (comma separated) file,
- or alternatively a plain-text file, containing one email address per line.
- </p>
+ <div class="form-separator"><hr><span>{{ $t('form.or') }}</span></div>
+ <p>{{ $t('invitation.create-csv') }}</p>
<div class="custom-file">
<input id="file" type="file" class="custom-file-input" name="csv" @change="fileChange">
- <label class="custom-file-label" for="file">Choose file...</label>
+ <label class="custom-file-label" for="file">{{ $t('btn.file') }}</label>
</div>
</form>
</div>
<div class="modal-footer">
- <button type="button" class="btn btn-secondary modal-cancel" data-dismiss="modal">Cancel</button>
+ <button type="button" class="btn btn-secondary modal-cancel" data-dismiss="modal">{{ $t('btn.cancel') }}</button>
<button type="button" class="btn btn-primary modal-action" @click="inviteUser()">
- <svg-icon icon="paper-plane"></svg-icon> Send invite(s)
+ <svg-icon icon="paper-plane"></svg-icon> {{ $t('invitation.send') }}
</button>
</div>
</div>
@@ -133,7 +130,7 @@
})
},
fileChange(e) {
- let label = 'Choose file...'
+ let label = this.$t('btn.file')
let files = e.target.files
if (files.length) {
@@ -263,20 +260,20 @@
return ''
},
- statusText(invitation) {
+ statusLabel(invitation) {
if (invitation.isCompleted) {
- return 'User signed up'
+ return 'completed'
}
if (invitation.isFailed) {
- return 'Sending failed'
+ return 'failed'
}
if (invitation.isSent) {
- return 'Sent'
+ return 'sent'
}
- return 'Not sent yet'
+ return 'new'
}
}
}
diff --git a/src/resources/vue/Reseller/Stats.vue b/src/resources/vue/Reseller/Stats.vue
--- a/src/resources/vue/Reseller/Stats.vue
+++ b/src/resources/vue/Reseller/Stats.vue
@@ -1,6 +1,5 @@
<template>
- <div id="stats-container" class="container">
- </div>
+ <div id="stats-container" class="container"></div>
</template>
<script>
diff --git a/src/resources/vue/Signup.vue b/src/resources/vue/Signup.vue
--- a/src/resources/vue/Signup.vue
+++ b/src/resources/vue/Signup.vue
@@ -18,41 +18,40 @@
<div class="card d-none" id="step1" v-if="!invitation">
<div class="card-body">
- <h4 class="card-title">Sign Up - Step 1/3</h4>
+ <h4 class="card-title">{{ $t('signup.title') }} - {{ $t('nav.step', { i: 1, n: 3 }) }}</h4>
<p class="card-text">
- Sign up to start your free month.
+ {{ $t('signup.step1') }}
</p>
<form @submit.prevent="submitStep1" data-validation-prefix="signup_">
<div class="form-group">
<div class="input-group">
- <input type="text" class="form-control" id="signup_first_name" placeholder="First Name" autofocus v-model="first_name">
- <input type="text" class="form-control rounded-right" id="signup_last_name" placeholder="Surname" v-model="last_name">
+ <input type="text" class="form-control" id="signup_first_name" :placeholder="$t('form.firstname')" autofocus v-model="first_name">
+ <input type="text" class="form-control rounded-right" id="signup_last_name" :placeholder="$t('form.surname')" v-model="last_name">
</div>
</div>
<div class="form-group">
- <label for="signup_email" class="sr-only">Existing Email Address</label>
- <input type="text" class="form-control" id="signup_email" placeholder="Existing Email Address" required v-model="email">
+ <label for="signup_email" class="sr-only">{{ $t('signup.email') }}</label>
+ <input type="text" class="form-control" id="signup_email" :placeholder="$t('signup.email')" required v-model="email">
</div>
- <button class="btn btn-secondary" type="button" @click="stepBack">Back</button>
- <button class="btn btn-primary" type="submit"><svg-icon icon="check"></svg-icon> Continue</button>
+ <button class="btn btn-secondary" type="button" @click="stepBack">{{ $t('btn.back') }}</button>
+ <button class="btn btn-primary" type="submit"><svg-icon icon="check"></svg-icon> {{ $t('btn.continue') }}</button>
</form>
</div>
</div>
<div class="card d-none" id="step2" v-if="!invitation">
<div class="card-body">
- <h4 class="card-title">Sign Up - Step 2/3</h4>
+ <h4 class="card-title">{{ $t('signup.title') }} - {{ $t('nav.step', { i: 2, n: 3 }) }}</h4>
<p class="card-text">
- We sent out a confirmation code to your email address.
- Enter the code we sent you, or click the link in the message.
+ {{ $t('signup.step2') }}
</p>
<form @submit.prevent="submitStep2" data-validation-prefix="signup_">
<div class="form-group">
- <label for="signup_short_code" class="sr-only">Confirmation Code</label>
- <input type="text" class="form-control" id="signup_short_code" placeholder="Confirmation Code" required v-model="short_code">
+ <label for="signup_short_code" class="sr-only">{{ $t('form.code') }}</label>
+ <input type="text" class="form-control" id="signup_short_code" :placeholder="$t('form.code')" required v-model="short_code">
</div>
- <button class="btn btn-secondary" type="button" @click="stepBack">Back</button>
- <button class="btn btn-primary" type="submit"><svg-icon icon="check"></svg-icon> Continue</button>
+ <button class="btn btn-secondary" type="button" @click="stepBack">{{ $t('btn.back') }}</button>
+ <button class="btn btn-primary" type="submit"><svg-icon icon="check"></svg-icon> {{ $t('btn.continue') }}</button>
<input type="hidden" id="signup_code" v-model="code" />
</form>
</div>
@@ -60,45 +59,45 @@
<div class="card d-none" id="step3">
<div class="card-body">
- <h4 v-if="!invitation" class="card-title">Sign Up - Step 3/3</h4>
+ <h4 v-if="!invitation" class="card-title">{{ $t('signup.title') }} - {{ $t('nav.step', { i: 3, n: 3 }) }}</h4>
<p class="card-text">
- Create your Kolab identity (you can choose additional addresses later).
+ {{ $t('signup.step3') }}
</p>
<form @submit.prevent="submitStep3" data-validation-prefix="signup_">
<div class="form-group" v-if="invitation">
<div class="input-group">
- <input type="text" class="form-control" id="signup_first_name" placeholder="First Name" autofocus v-model="first_name">
- <input type="text" class="form-control rounded-right" id="signup_last_name" placeholder="Surname" v-model="last_name">
+ <input type="text" class="form-control" id="signup_first_name" :placeholder="$t('form.firstname')" autofocus v-model="first_name">
+ <input type="text" class="form-control rounded-right" id="signup_last_name" :placeholder="$t('form.surname')" v-model="last_name">
</div>
</div>
<div class="form-group">
<label for="signup_login" class="sr-only"></label>
<div class="input-group">
- <input type="text" class="form-control" id="signup_login" required v-model="login" placeholder="Login">
+ <input type="text" class="form-control" id="signup_login" required v-model="login" :placeholder="$t('signup.login')">
<span class="input-group-append input-group-prepend">
<span class="input-group-text">@</span>
</span>
- <input v-if="is_domain" type="text" class="form-control rounded-right" id="signup_domain" required v-model="domain" placeholder="Domain">
+ <input v-if="is_domain" type="text" class="form-control rounded-right" id="signup_domain" required v-model="domain" :placeholder="$t('form.domain')">
<select v-else class="custom-select rounded-right" id="signup_domain" required v-model="domain">
<option v-for="domain in domains" :key="domain" :value="domain">{{ domain }}</option>
</select>
</div>
</div>
<div class="form-group">
- <label for="signup_password" class="sr-only">Password</label>
- <input type="password" class="form-control" id="signup_password" placeholder="Password" required v-model="password">
+ <label for="signup_password" class="sr-only">{{ $t('form.password') }}</label>
+ <input type="password" class="form-control" id="signup_password" :placeholder="$t('form.password')" required v-model="password">
</div>
<div class="form-group">
- <label for="signup_confirm" class="sr-only">Confirm Password</label>
- <input type="password" class="form-control" id="signup_confirm" placeholder="Confirm Password" required v-model="password_confirmation">
+ <label for="signup_confirm" class="sr-only">{{ $t('form.password-confirm') }}</label>
+ <input type="password" class="form-control" id="signup_confirm" :placeholder="$t('form.password-confirm')" required v-model="password_confirmation">
</div>
<div class="form-group pt-2 pb-2">
- <label for="signup_voucher" class="sr-only">Voucher code</label>
- <input type="text" class="form-control" id="signup_voucher" placeholder="Voucher code" v-model="voucher">
+ <label for="signup_voucher" class="sr-only">{{ $t('signup.voucher') }}</label>
+ <input type="text" class="form-control" id="signup_voucher" :placeholder="$t('signup.voucher')" v-model="voucher">
</div>
- <button v-if="!invitation" class="btn btn-secondary" type="button" @click="stepBack">Back</button>
+ <button v-if="!invitation" class="btn btn-secondary" type="button" @click="stepBack">{{ $t('btn.back') }}</button>
<button class="btn btn-primary" type="submit">
- <svg-icon icon="check"></svg-icon> <span v-if="invitation">Sign Up</span><span v-else>Submit</span>
+ <svg-icon icon="check"></svg-icon> <span v-if="invitation">{{ $t('btn.signup') }}</span><span v-else>{{ $t('btn.submit') }}</span>
</button>
</form>
</div>
diff --git a/src/resources/vue/User/Info.vue b/src/resources/vue/User/Info.vue
--- a/src/resources/vue/User/Info.vue
+++ b/src/resources/vue/User/Info.vue
@@ -4,61 +4,61 @@
<div class="card" id="user-info">
<div class="card-body">
- <div class="card-title" v-if="user_id !== 'new'">User account
+ <div class="card-title" v-if="user_id !== 'new'">{{ $t('user.title') }}
<button
class="btn btn-outline-danger button-delete float-right"
@click="showDeleteConfirmation()" type="button"
>
- <svg-icon icon="trash-alt"></svg-icon> Delete user
+ <svg-icon icon="trash-alt"></svg-icon> {{ $t('user.delete') }}
</button>
</div>
- <div class="card-title" v-if="user_id === 'new'">New user account</div>
+ <div class="card-title" v-if="user_id === 'new'">{{ $t('user.new') }}</div>
<div class="card-text">
<form @submit.prevent="submit">
<div v-if="user_id !== 'new'" class="form-group row plaintext">
- <label for="status" class="col-sm-4 col-form-label">Status</label>
+ <label for="status" class="col-sm-4 col-form-label">{{ $t('form.status') }}</label>
<div class="col-sm-8">
<span :class="$root.userStatusClass(user) + ' form-control-plaintext'" id="status">{{ $root.userStatusText(user) }}</span>
</div>
</div>
<div class="form-group row">
- <label for="first_name" class="col-sm-4 col-form-label">First name</label>
+ <label for="first_name" class="col-sm-4 col-form-label">{{ $t('form.firstname') }}</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="first_name" v-model="user.first_name">
</div>
</div>
<div class="form-group row">
- <label for="last_name" class="col-sm-4 col-form-label">Last name</label>
+ <label for="last_name" class="col-sm-4 col-form-label">{{ $t('form.lastname') }}</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="last_name" v-model="user.last_name">
</div>
</div>
<div class="form-group row">
- <label for="organization" class="col-sm-4 col-form-label">Organization</label>
+ <label for="organization" class="col-sm-4 col-form-label">{{ $t('user.org') }}</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="organization" v-model="user.organization">
</div>
</div>
<div class="form-group row">
- <label for="email" class="col-sm-4 col-form-label">Email</label>
+ <label for="email" class="col-sm-4 col-form-label">{{ $t('form.email') }}</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="email" :disabled="user_id !== 'new'" required v-model="user.email">
</div>
</div>
<div class="form-group row">
- <label for="aliases-input" class="col-sm-4 col-form-label">Email aliases</label>
+ <label for="aliases-input" class="col-sm-4 col-form-label">{{ $t('user.aliases-email') }}</label>
<div class="col-sm-8">
<list-input id="aliases" :list="user.aliases"></list-input>
</div>
</div>
<div class="form-group row">
- <label for="password" class="col-sm-4 col-form-label">Password</label>
+ <label for="password" class="col-sm-4 col-form-label">{{ $t('form.password') }}</label>
<div class="col-sm-8">
<input type="password" class="form-control" id="password" v-model="user.password" :required="user_id === 'new'">
</div>
</div>
<div class="form-group row">
- <label for="password_confirmaton" class="col-sm-4 col-form-label">Confirm password</label>
+ <label for="password_confirmaton" class="col-sm-4 col-form-label">{{ $t('form.password-confirm') }}</label>
<div class="col-sm-8">
<input type="password" class="form-control" id="password_confirmation" v-model="user.password_confirmation" :required="user_id === 'new'">
</div>
@@ -70,8 +70,8 @@
<thead class="thead-light sr-only">
<tr>
<th scope="col"></th>
- <th scope="col">Package</th>
- <th scope="col">Price</th>
+ <th scope="col">{{ $t('user.package') }}</th>
+ <th scope="col">{{ $t('user.price') }}</th>
<th scope="col"></th>
</tr>
</thead>
@@ -93,7 +93,7 @@
<td class="buttons">
<button v-if="pkg.description" type="button" class="btn btn-link btn-lg p-0" v-tooltip.click="pkg.description">
<svg-icon icon="info-circle"></svg-icon>
- <span class="sr-only">More information</span>
+ <span class="sr-only">{{ $t('btn.moreinfo') }}</span>
</button>
</td>
</tr>
@@ -101,19 +101,19 @@
</table>
<small v-if="discount > 0" class="hint">
<hr class="m-0">
- &sup1; applied discount: {{ discount }}% - {{ discount_description }}
+ &sup1; {{ $t('user.discount-hint') }}: {{ discount }}% - {{ discount_description }}
</small>
</div>
</div>
<div v-if="user_id !== 'new'" id="user-skus" class="form-group row">
- <label class="col-sm-4 col-form-label">Subscriptions</label>
+ <label class="col-sm-4 col-form-label">{{ $t('user.subscriptions') }}</label>
<div class="col-sm-8">
<table class="table table-sm form-list">
<thead class="thead-light sr-only">
<tr>
<th scope="col"></th>
- <th scope="col">Subscription</th>
- <th scope="col">Price</th>
+ <th scope="col">{{ $t('user.subscription') }}</th>
+ <th scope="col">{{ $t('user.price') }}</th>
<th scope="col"></th>
</tr>
</thead>
@@ -145,7 +145,7 @@
<td class="buttons">
<button v-if="sku.description" type="button" class="btn btn-link btn-lg p-0" v-tooltip.click="sku.description">
<svg-icon icon="info-circle"></svg-icon>
- <span class="sr-only">More information</span>
+ <span class="sr-only">{{ $t('btn.moreinfo') }}</span>
</button>
</td>
</tr>
@@ -153,11 +153,11 @@
</table>
<small v-if="discount > 0" class="hint">
<hr class="m-0">
- &sup1; applied discount: {{ discount }}% - {{ discount_description }}
+ &sup1; {{ $t('user.discount-hint') }}: {{ discount }}% - {{ discount_description }}
</small>
</div>
</div>
- <button class="btn btn-primary" type="submit"><svg-icon icon="check"></svg-icon> Submit</button>
+ <button class="btn btn-primary" type="submit"><svg-icon icon="check"></svg-icon> {{ $t('btn.submit') }}</button>
</form>
</div>
</div>
@@ -167,19 +167,17 @@
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title"></h5>
- <button type="button" class="close" data-dismiss="modal" aria-label="Close">
+ <button type="button" class="close" data-dismiss="modal" :aria-label="$t('btn.close')">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
- <p>Do you really want to delete this user permanently?
- This will delete all account data and withdraw the permission to access the email account.
- Please note that this action cannot be undone.</p>
+ <p>{{ $t('user.delete-text') }}</p>
</div>
<div class="modal-footer">
- <button type="button" class="btn btn-secondary modal-cancel" data-dismiss="modal">Cancel</button>
+ <button type="button" class="btn btn-secondary modal-cancel" data-dismiss="modal">{{ $t('btn.cancel') }}</button>
<button type="button" class="btn btn-danger modal-action" @click="deleteUser()">
- <svg-icon icon="trash-alt"></svg-icon> Delete
+ <svg-icon icon="trash-alt"></svg-icon> {{ $t('btn.delete') }}
</button>
</div>
</div>
@@ -346,7 +344,7 @@
if (required.length) {
input.checked = false
- return alert(sku.name + ' requires ' + required.join(', ') + '.')
+ return alert(this.$t('user.skureq', { sku: sku.name, list: required.join(', ') }))
}
} else {
// Uncheck all dependent SKUs, e.g. when unchecking Groupware we also uncheck Activesync
@@ -434,7 +432,7 @@
} else {
// Display the warning
let dialog = $('#delete-warning')
- dialog.find('.modal-title').text('Delete ' + this.user.email)
+ dialog.find('.modal-title').text(this.$t('user.delete-email', { email: this.user.email }))
dialog.on('shown.bs.modal', () => {
dialog.find('button.modal-cancel').focus()
}).modal()
diff --git a/src/resources/vue/User/List.vue b/src/resources/vue/User/List.vue
--- a/src/resources/vue/User/List.vue
+++ b/src/resources/vue/User/List.vue
@@ -3,16 +3,16 @@
<div class="card" id="user-list">
<div class="card-body">
<div class="card-title">
- User Accounts
+ {{ $t('user.list-title') }}
<router-link class="btn btn-success float-right create-user" :to="{ path: 'user/new' }" tag="button">
- <svg-icon icon="user"></svg-icon> Create user
+ <svg-icon icon="user"></svg-icon> {{ $t('user.create') }}
</router-link>
</div>
<div class="card-text">
<table class="table table-sm table-hover">
<thead class="thead-light">
<tr>
- <th scope="col">Primary Email</th>
+ <th scope="col">{{ $t('form.primary-email') }}</th>
</tr>
</thead>
<tbody>
@@ -25,7 +25,7 @@
</tbody>
<tfoot class="table-fake-body">
<tr>
- <td>There are no users in this account.</td>
+ <td>{{ $t('user.users-none') }}</td>
</tr>
</tfoot>
</table>
diff --git a/src/resources/vue/User/Profile.vue b/src/resources/vue/User/Profile.vue
--- a/src/resources/vue/User/Profile.vue
+++ b/src/resources/vue/User/Profile.vue
@@ -3,61 +3,61 @@
<div class="card" id="user-profile">
<div class="card-body">
<div class="card-title">
- Your profile
+ {{ $t('user.profile-title') }}
<router-link
v-if="$root.isController(wallet_id)"
class="btn btn-outline-danger button-delete float-right"
to="/profile/delete" tag="button"
>
- <svg-icon icon="trash-alt"></svg-icon> Delete account
+ <svg-icon icon="trash-alt"></svg-icon> {{ $t('user.profile-delete') }}
</router-link>
</div>
<div class="card-text">
<form @submit.prevent="submit">
<div class="form-group row plaintext">
- <label class="col-sm-4 col-form-label">Customer No.</label>
+ <label class="col-sm-4 col-form-label">{{ $t('user.custno') }}</label>
<div class="col-sm-8">
<span class="form-control-plaintext" id="userid">{{ user_id }}</span>
</div>
</div>
<div class="form-group row">
- <label for="first_name" class="col-sm-4 col-form-label">First name</label>
+ <label for="first_name" class="col-sm-4 col-form-label">{{ $t('form.firstname') }}</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="first_name" v-model="profile.first_name">
</div>
</div>
<div class="form-group row">
- <label for="last_name" class="col-sm-4 col-form-label">Last name</label>
+ <label for="last_name" class="col-sm-4 col-form-label">{{ $t('form.lastname') }}</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="last_name" v-model="profile.last_name">
</div>
</div>
<div class="form-group row">
- <label for="organization" class="col-sm-4 col-form-label">Organization</label>
+ <label for="organization" class="col-sm-4 col-form-label">{{ $t('user.org') }}</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="organization" v-model="profile.organization">
</div>
</div>
<div class="form-group row">
- <label for="phone" class="col-sm-4 col-form-label">Phone</label>
+ <label for="phone" class="col-sm-4 col-form-label">{{ $t('form.phone') }}</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="phone" v-model="profile.phone">
</div>
</div>
<div class="form-group row">
- <label for="external_email" class="col-sm-4 col-form-label">External email</label>
+ <label for="external_email" class="col-sm-4 col-form-label">{{ $t('user.ext-email') }}</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="external_email" v-model="profile.external_email">
</div>
</div>
<div class="form-group row">
- <label for="billing_address" class="col-sm-4 col-form-label">Address</label>
+ <label for="billing_address" class="col-sm-4 col-form-label">{{ $t('user.address') }}</label>
<div class="col-sm-8">
<textarea class="form-control" id="billing_address" rows="3" v-model="profile.billing_address"></textarea>
</div>
</div>
<div class="form-group row">
- <label for="country" class="col-sm-4 col-form-label">Country</label>
+ <label for="country" class="col-sm-4 col-form-label">{{ $t('user.country') }}</label>
<div class="col-sm-8">
<select class="form-control custom-select" id="country" v-model="profile.country">
<option value="">-</option>
@@ -66,18 +66,18 @@
</div>
</div>
<div class="form-group row">
- <label for="password" class="col-sm-4 col-form-label">Password</label>
+ <label for="password" class="col-sm-4 col-form-label">{{ $t('form.password') }}</label>
<div class="col-sm-8">
<input type="password" class="form-control" id="password" v-model="profile.password">
</div>
</div>
<div class="form-group row">
- <label for="password_confirmaton" class="col-sm-4 col-form-label">Confirm password</label>
+ <label for="password_confirmaton" class="col-sm-4 col-form-label">{{ $t('form.password-confirm') }}</label>
<div class="col-sm-8">
<input type="password" class="form-control" id="password_confirmation" v-model="profile.password_confirmation">
</div>
</div>
- <button class="btn btn-primary button-submit" type="submit"><svg-icon icon="check"></svg-icon> Submit</button>
+ <button class="btn btn-primary button-submit" type="submit"><svg-icon icon="check"></svg-icon> {{ $t('btn.submit') }}</button>
</form>
</div>
</div>
diff --git a/src/resources/vue/User/ProfileDelete.vue b/src/resources/vue/User/ProfileDelete.vue
--- a/src/resources/vue/User/ProfileDelete.vue
+++ b/src/resources/vue/User/ProfileDelete.vue
@@ -4,21 +4,13 @@
<div class="card-body">
<div class="card-title">Delete this account?</div>
<div class="card-text">
- <p>This will delete the account as well as all domains, users and aliases associated with this account.
- <strong>This operation is irreversible</strong>.</p>
- <p>As you will not be able to recover anything after this point, please make sure
- that you have migrated all data before proceeding.</p>
- <p v-if="supportEmail">
- As we always strive to improve, we would like to ask for 2 minutes of your time.
- The best tool for improvement is feedback from users, and we would like to ask
- for a few words about your reasons for leaving our service. Please send your feedback
- to <a :href="'mailto:' + supportEmail">{{ supportEmail }}</a>.
- </p>
- <p>Also feel free to contact {{ $root.appName }} Support with any questions
- or concerns that you may have in this context.</p>
- <button class="btn btn-secondary button-cancel" @click="$router.go(-1)">Cancel</button>
+ <p>{{ $t('user.profile-delete-text1') }} <strong>{{ $t('user.profile-delete-warning') }}</strong>.</p>
+ <p>{{ $t('user.profile-delete-text2') }}</p>
+ <p v-if="supportEmail" v-html="$t('user.profile-delete-support', { href: 'mailto:' + supportEmail, email: supportEmail })"></p>
+ <p>{{ $t('user.profile-delete-contact', { app: $root.appName }) }}</p>
+ <button class="btn btn-secondary button-cancel" @click="$router.go(-1)">{{ $t('btn.cancel') }}</button>
<button class="btn btn-danger button-delete" @click="deleteProfile">
- <svg-icon icon="trash-alt"></svg-icon> Delete account
+ <svg-icon icon="trash-alt"></svg-icon> {{ $t('user.profile-delete') }}
</button>
</div>
</div>
diff --git a/src/resources/vue/Wallet.vue b/src/resources/vue/Wallet.vue
--- a/src/resources/vue/Wallet.vue
+++ b/src/resources/vue/Wallet.vue
@@ -2,45 +2,39 @@
<div class="container" dusk="wallet-component">
<div v-if="wallet.id" id="wallet" class="card">
<div class="card-body">
- <div class="card-title">Account balance <span :class="wallet.balance < 0 ? 'text-danger' : 'text-success'">{{ $root.price(wallet.balance, wallet.currency) }}</span></div>
+ <div class="card-title">{{ $t('wallet.title') }} <span :class="wallet.balance < 0 ? 'text-danger' : 'text-success'">{{ $root.price(wallet.balance, wallet.currency) }}</span></div>
<div class="card-text">
<p v-if="wallet.notice" id="wallet-notice">{{ wallet.notice }}</p>
<div v-if="showPendingPayments" class="alert alert-warning">
- You have payments that are still in progress. See the "Pending Payments" tab below.
+ {{ $t('wallet.pending-payments-warning') }}
</div>
<p>
- <button type="button" class="btn btn-primary" @click="paymentMethodForm('manual')">Add credit</button>
+ <button type="button" class="btn btn-primary" @click="paymentMethodForm('manual')">{{ $t('wallet.add-credit') }}</button>
</p>
<div id="mandate-form" v-if="!mandate.isValid && !mandate.isPending">
<template v-if="mandate.id && !mandate.isValid">
<div class="alert alert-danger">
- The setup of automatic payments failed. Restart the process to enable automatic top-ups.
+ {{ $t('wallet.auto-payment-failed') }}
</div>
- <button type="button" class="btn btn-danger" @click="autoPaymentDelete">Cancel auto-payment</button>
+ <button type="button" class="btn btn-danger" @click="autoPaymentDelete">{{ $t('wallet.auto-payment-cancel') }}</button>
</template>
- <button type="button" class="btn btn-primary" @click="paymentMethodForm('auto')">Set up auto-payment</button>
+ <button type="button" class="btn btn-primary" @click="paymentMethodForm('auto')">{{ $t('wallet.auto-payment-setup') }}</button>
</div>
<div id="mandate-info" v-else>
<div v-if="mandate.isDisabled" class="disabled-mandate alert alert-danger">
- The configured auto-payment has been disabled. Top up your wallet or
- raise the auto-payment amount.
+ {{ $t('wallet.auto-payment-disabled') }}
</div>
<template v-else>
- <p>
- Auto-payment is <b>set</b> to fill up your account by <b>{{ mandate.amount }} CHF</b>
- every time your account balance gets under <b>{{ mandate.balance }} CHF</b>.
- </p>
- <p>
- Method of payment: {{ mandate.method }}
- </p>
+ <p v-html="$t('wallet.auto-payment-info', { amount: mandate.amount, balance: mandate.balance })"></p>
+ <p>{{ $t('wallet.payment-method', { method: mandate.method }) }}</p>
</template>
<div v-if="mandate.isPending" class="alert alert-warning">
- The setup of the automatic payment is still in progress.
+ {{ $t('wallet.auto-payment-inprogress') }}
</div>
<p>
- <button type="button" class="btn btn-danger" @click="autoPaymentDelete">Cancel auto-payment</button>
- <button type="button" class="btn btn-primary" @click="autoPaymentChange">Change auto-payment</button>
+ <button type="button" class="btn btn-danger" @click="autoPaymentDelete">{{ $t('wallet.auto-payment-cancel') }}</button>
+ <button type="button" class="btn btn-primary" @click="autoPaymentChange">{{ $t('wallet.auto-payment-change') }}</button>
</p>
</div>
</div>
@@ -50,17 +44,17 @@
<ul class="nav nav-tabs mt-3" role="tablist">
<li class="nav-item">
<a class="nav-link active" id="tab-receipts" href="#wallet-receipts" role="tab" aria-controls="wallet-receipts" aria-selected="true">
- Receipts
+ {{ $t('wallet.receipts') }}
</a>
</li>
<li class="nav-item">
<a class="nav-link" id="tab-history" href="#wallet-history" role="tab" aria-controls="wallet-history" aria-selected="false">
- History
+ {{ $t('wallet.history') }}
</a>
</li>
<li v-if="showPendingPayments" class="nav-item">
<a class="nav-link" id="tab-payments" href="#wallet-payments" role="tab" aria-controls="wallet-payments" aria-selected="false">
- Pending Payments
+ {{ $t('wallet.pending-payments') }}
</a>
</li>
</ul>
@@ -69,8 +63,7 @@
<div class="card-body">
<div class="card-text">
<p v-if="receipts.length">
- Here you can download receipts (in PDF format) for payments in specified period.
- Select the period and press the Download button.
+ {{ $t('wallet.receipts-hint') }}
</p>
<div v-if="receipts.length" class="input-group">
<select id="receipt-id" class="form-control">
@@ -78,13 +71,12 @@
</select>
<div class="input-group-append">
<button type="button" class="btn btn-secondary" @click="receiptDownload">
- <svg-icon icon="download"></svg-icon> Download
+ <svg-icon icon="download"></svg-icon> {{ $t('btn.download') }}
</button>
</div>
</div>
<p v-if="!receipts.length">
- There are no receipts for payments in this account. Please, note that you can download
- receipts after the month ends.
+ {{ $t('wallet.receipts-none') }}
</p>
</div>
</div>
@@ -106,7 +98,7 @@
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">{{ paymentDialogTitle }}</h5>
- <button type="button" class="close" data-dismiss="modal" aria-label="Close">
+ <button type="button" class="close" data-dismiss="modal" :aria-label="$t('btn.close')">
<span aria-hidden="true">&times;</span>
</button>
</div>
@@ -124,14 +116,14 @@
</div>
<div id="manual-payment" v-if="paymentForm == 'manual'">
<p v-if="wallet.currency != selectedPaymentMethod.currency">
- Here is how it works: You specify the amount by which you want to to up your wallet in {{ wallet.currency }}.
- We will then convert this to {{ selectedPaymentMethod.currency }}, and on the next page you will be provided with the bank-details
- to transfer the amount in {{ selectedPaymentMethod.currency }}.
+ {{ $t('wallet.currency-conv', { wc: wallet.currency, pc: selectedPaymentMethod.currency }) }}
</p>
<p v-if="selectedPaymentMethod.id == 'banktransfer'">
- Please note that a bank transfer can take several days to complete.
+ {{ $t('wallet.banktransfer-hint') }}
+ </p>
+ <p>
+ {{ $t('wallet.payment-amount-hint') }}
</p>
- <p>Choose the amount by which you want to top up your wallet.</p>
<form id="payment-form" @submit.prevent="payment">
<div class="form-group">
<div class="input-group">
@@ -142,19 +134,17 @@
</div>
</div>
<div v-if="wallet.currency != selectedPaymentMethod.currency && !isNaN(amount)" class="alert alert-warning">
- You will be charged for {{ $root.price(amount * selectedPaymentMethod.exchangeRate * 100, selectedPaymentMethod.currency) }}
+ {{ $t('wallet.payment-warning', { price: $root.price(amount * selectedPaymentMethod.exchangeRate * 100, selectedPaymentMethod.currency) }) }}
</div>
</form>
</div>
<div id="auto-payment" v-if="paymentForm == 'auto'">
<form data-validation-prefix="mandate_">
<p>
- Here is how it works: Every time your account runs low,
- we will charge your preferred payment method for an amount you choose.
- You can cancel or change the auto-payment option at any time.
+ {{ $t('wallet.auto-payment-hint') }}
</p>
<div class="form-group row">
- <label for="mandate_amount" class="col-sm-6 col-form-label">Fill up by</label>
+ <label for="mandate_amount" class="col-sm-6 col-form-label">{{ $t('wallet.fill-up') }}</label>
<div class="input-group col-sm-6">
<input type="text" class="form-control" id="mandate_amount" v-model="mandate.amount" required>
<span class="input-group-append">
@@ -163,7 +153,7 @@
</div>
</div>
<div class="form-group row">
- <label for="mandate_balance" class="col-sm-6 col-form-label">when account balance is below</label>
+ <label for="mandate_balance" class="col-sm-6 col-form-label">{{ $t('wallet.when-below') }}</label>
<div class="col-sm-6">
<div class="input-group">
<input type="text" class="form-control" id="mandate_balance" v-model="mandate.balance" required>
@@ -174,35 +164,33 @@
</div>
</div>
<p v-if="!mandate.isValid">
- Next, you will be redirected to the checkout page, where you can provide
- your credit card details.
+ {{ $t('wallet.auto-payment-next') }}
</p>
<div v-if="mandate.isValid && mandate.isDisabled" class="disabled-mandate alert alert-danger">
- The auto-payment is disabled. Immediately after you submit new settings we'll
- enable it and attempt to top up your wallet.
+ {{ $t('wallet.auto-payment-disabled-next') }}
</div>
</form>
</div>
</div>
<div class="modal-footer">
- <button type="button" class="btn btn-secondary modal-cancel" data-dismiss="modal">Cancel</button>
+ <button type="button" class="btn btn-secondary modal-cancel" data-dismiss="modal">{{ $t('btn.cancel') }}</button>
<button type="button" class="btn btn-primary modal-action"
v-if="paymentForm == 'auto' && (mandate.isValid || mandate.isPending)"
@click="autoPayment"
>
- <svg-icon icon="check"></svg-icon> Submit
+ <svg-icon icon="check"></svg-icon> {{ $t('btn.submit') }}
</button>
<button type="button" class="btn btn-primary modal-action"
v-if="paymentForm == 'auto' && !mandate.isValid && !mandate.isPending"
@click="autoPayment"
>
- <svg-icon icon="check"></svg-icon> Continue
+ <svg-icon icon="check"></svg-icon> {{ $t('btn.continue') }}
</button>
<button type="button" class="btn btn-primary modal-action"
v-if="paymentForm == 'manual'"
@click="payment"
>
- <svg-icon icon="check"></svg-icon> Continue
+ <svg-icon icon="check"></svg-icon> {{ $t('btn.continue') }}
</button>
</div>
</div>
@@ -382,7 +370,7 @@
})
},
autoPaymentChange(event) {
- this.autoPaymentForm(event, 'Update auto-payment')
+ this.autoPaymentForm(event, this.$t('wallet.auto-payment-update'))
},
autoPaymentDelete() {
axios.delete('/api/v4/payments/mandate')
@@ -402,9 +390,9 @@
this.paymentForm = 'method'
this.nextForm = nextForm
if (nextForm == 'auto') {
- this.paymentDialogTitle = 'Add auto-payment'
+ this.paymentDialogTitle = this.$t('wallet.auto-payment-setup')
} else {
- this.paymentDialogTitle = 'Top up your wallet'
+ this.paymentDialogTitle = this.$t('wallet.top-up')
}
const methods = $('#payment-method')
diff --git a/src/resources/vue/Widgets/ListInput.vue b/src/resources/vue/Widgets/ListInput.vue
--- a/src/resources/vue/Widgets/ListInput.vue
+++ b/src/resources/vue/Widgets/ListInput.vue
@@ -5,7 +5,7 @@
<div class="input-group-append">
<a href="#" class="btn btn-outline-secondary" @click.prevent="addItem">
<svg-icon icon="plus"></svg-icon>
- <span class="sr-only">Add</span>
+ <span class="sr-only">{{ $t('btn.add') }}</span>
</a>
</div>
</div>
@@ -14,7 +14,7 @@
<div class="input-group-append">
<a href="#" class="btn btn-outline-secondary" @click.prevent="deleteItem(index)">
<svg-icon icon="trash-alt"></svg-icon>
- <span class="sr-only">Delete</span>
+ <span class="sr-only">{{ $t('btn.delete') }}</span>
</a>
</div>
</div>
diff --git a/src/resources/vue/Widgets/PaymentLog.vue b/src/resources/vue/Widgets/PaymentLog.vue
--- a/src/resources/vue/Widgets/PaymentLog.vue
+++ b/src/resources/vue/Widgets/PaymentLog.vue
@@ -3,28 +3,28 @@
<table class="table table-sm m-0 payments">
<thead class="thead-light">
<tr>
- <th scope="col">Date</th>
- <th scope="col">Description</th>
+ <th scope="col">{{ $t('form.date') }}</th>
+ <th scope="col">{{ $t('form.description') }}</th>
<th scope="col"></th>
- <th scope="col" class="price">Amount</th>
+ <th scope="col" class="price">{{ $t('form.amount') }}</th>
</tr>
</thead>
<tbody>
<tr v-for="payment in payments" :id="'log' + payment.id" :key="payment.id">
<td class="datetime">{{ payment.createdAt }}</td>
<td class="description">{{ payment.description }}</td>
- <td><a v-if="payment.checkoutUrl" :href="payment.checkoutUrl">Details</a></td>
+ <td><a v-if="payment.checkoutUrl" :href="payment.checkoutUrl">{{ $t('form.details') }}</a></td>
<td class="price text-success">{{ amount(payment) }}</td>
</tr>
</tbody>
<tfoot class="table-fake-body">
<tr>
- <td colspan="4">There are no pending payments for this account.</td>
+ <td colspan="4">{{ $t('wallet.pending-payments-none') }}</td>
</tr>
</tfoot>
</table>
<div class="text-center p-3" id="payments-loader" v-if="hasMore">
- <button class="btn btn-secondary" @click="loadLog(true)">Load more</button>
+ <button class="btn btn-secondary" @click="loadLog(true)">{{ $t('nav.more') }}</button>
</div>
</div>
</template>
diff --git a/src/resources/vue/Widgets/Status.vue b/src/resources/vue/Widgets/Status.vue
--- a/src/resources/vue/Widgets/Status.vue
+++ b/src/resources/vue/Widgets/Status.vue
@@ -2,34 +2,35 @@
<div v-if="!state.isReady" id="status-box" :class="'p-4 mb-3 rounded process-' + className">
<div v-if="state.step != 'domain-confirmed'" class="d-flex align-items-start">
<p id="status-body" class="flex-grow-1">
- <span v-if="scope == 'dashboard'">We are preparing your account.</span>
- <span v-else-if="scope == 'domain'">We are preparing the domain.</span>
- <span v-else-if="scope == 'distlist'">We are preparing the distribution list.</span>
- <span v-else>We are preparing the user account.</span>
+ <span v-if="scope == 'dashboard'">{{ $t('status.prepare-account') }}</span>
+ <span v-else-if="scope == 'domain'">{{ $t('status.prepare-domain') }}</span>
+ <span v-else-if="scope == 'distlist'">{{ $t('status.prepare-distlist') }}</span>
+ <span v-else>{{ $t('status.prepare-user') }}</span>
<br>
- Some features may be missing or readonly at the moment.<br>
- <span id="refresh-text" v-if="refresh">The process never ends? Press the "Refresh" button, please.</span>
+ {{ $t('status.prepare-hint') }}
+ <br>
+ <span id="refresh-text" v-if="refresh">{{ $t('status.prepare-refresh') }}</span>
</p>
<button v-if="refresh" id="status-refresh" href="#" class="btn btn-secondary" @click="statusRefresh">
- <svg-icon icon="sync-alt"></svg-icon> Refresh
+ <svg-icon icon="sync-alt"></svg-icon> {{ $t('btn.refresh') }}
</button>
</div>
<div v-else class="d-flex align-items-start">
<p id="status-body" class="flex-grow-1">
- <span v-if="scope == 'dashboard'">Your account is almost ready.</span>
- <span v-else-if="scope == 'domain'">The domain is almost ready.</span>
- <span v-else-if="scope == 'distlist'">The distribution list is almost ready.</span>
- <span v-else>The user account is almost ready.</span>
+ <span v-if="scope == 'dashboard'">{{ $t('status.ready-account') }}</span>
+ <span v-else-if="scope == 'domain'">{{ $t('status.ready-domain') }}</span>
+ <span v-else-if="scope == 'distlist'">{{ $t('status.ready-distlist') }}</span>
+ <span v-else>{{ $t('status.ready-user') }}</span>
<br>
- Verify your domain to finish the setup process.
+ {{ $t('status.verify') }}
</p>
<div v-if="scope == 'domain'">
<button id="status-verify" class="btn btn-secondary text-nowrap" @click="confirmDomain">
- <svg-icon icon="sync-alt"></svg-icon> Verify
+ <svg-icon icon="sync-alt"></svg-icon> {{ $t('btn.verify') }}
</button>
</div>
<div v-else-if="state.link && scope != 'domain'">
- <router-link id="status-link" class="btn btn-secondary" :to="{ path: state.link }">Verify domain</router-link>
+ <router-link id="status-link" class="btn btn-secondary" :to="{ path: state.link }">{{ $t('status.verify-domain') }}</router-link>
</div>
</div>
@@ -37,7 +38,7 @@
<div class="progress">
<div class="progress-bar" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"></div>
</div>
- <span class="progress-label">{{ state.title || 'Initializing...' }}</span>
+ <span class="progress-label">{{ state.title || $t('msg.initializing') }}</span>
</div>
</div>
</template>
diff --git a/src/resources/vue/Widgets/SupportForm.vue b/src/resources/vue/Widgets/SupportForm.vue
--- a/src/resources/vue/Widgets/SupportForm.vue
+++ b/src/resources/vue/Widgets/SupportForm.vue
@@ -3,39 +3,39 @@
<div class="modal-dialog" role="document">
<form class="modal-content" @submit.prevent="submit">
<div class="modal-header">
- <h5 class="modal-title">Contact Support</h5>
- <button type="button" class="close" data-dismiss="modal" aria-label="Close">
+ <h5 class="modal-title">{{ $t('support.title') }}</h5>
+ <button type="button" class="close" data-dismiss="modal" :aria-label="$t('btn.close')">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<div class="form">
<div class="form-group">
- <label>Customer number or email address you have with us</label>
- <input id="support-user" type="text" class="form-control" placeholder="e.g. 12345678 or john@kolab.org" v-model="user" />
- <small class="form-text text-muted">Leave blank if you are not a customer yet</small>
+ <label for="support-user">{{ $t('support.id') }}</label>
+ <input id="support-user" type="text" class="form-control" :placeholder="$t('support.id-pl')" v-model="user" />
+ <small class="form-text text-muted">{{ $t('support.id-hint') }}</small>
</div>
<div class="form-group">
- <label>Name</label>
- <input id="support-name" type="text" class="form-control" placeholder="how we should call you in our reply" v-model="name" />
+ <label for="support-name">{{ $t('support.name') }}</label>
+ <input id="support-name" type="text" class="form-control" :placeholder="$t('support.name-pl')" v-model="name" />
</div>
<div class="form-group">
- <label>Working email address</label>
- <input id="support-email" type="email" class="form-control" placeholder="make sure we can reach you at this address" v-model="email" required />
+ <label for="support-email">{{ $t('support.email') }}</label>
+ <input id="support-email" type="email" class="form-control" :placeholder="$t('support.email-pl')" v-model="email" required />
</div>
<div class="form-group">
- <label>Issue Summary</label>
- <input id="support-summary" type="text" class="form-control" placeholder="one sentence that summarizes your issue" v-model="summary" required />
+ <label for="support-summary">{{ $t('support.summary') }}</label>
+ <input id="support-summary" type="text" class="form-control" :placeholder="$t('support.summary-pl')" v-model="summary" required />
</div>
<div class="form-group">
- <label>Issue Explanation</label>
+ <label for="support-body">{{ $t('support.expl') }}</label>
<textarea id="support-body" class="form-control" rows="5" v-model="body" required></textarea>
</div>
</div>
</div>
<div class="modal-footer">
- <button type="button" class="btn btn-secondary modal-cancel" data-dismiss="modal">Cancel</button>
- <button type="submit" class="btn btn-primary modal-action"><svg-icon icon="check"></svg-icon> Submit</button>
+ <button type="button" class="btn btn-secondary modal-cancel" data-dismiss="modal">{{ $t('btn.cancel') }}</button>
+ <button type="submit" class="btn btn-primary modal-action"><svg-icon icon="check"></svg-icon> {{ $t('btn.submit') }}</button>
</div>
</form>
</div>
diff --git a/src/resources/vue/Widgets/Toast.vue b/src/resources/vue/Widgets/Toast.vue
--- a/src/resources/vue/Widgets/Toast.vue
+++ b/src/resources/vue/Widgets/Toast.vue
@@ -4,10 +4,12 @@
<script>
import ToastMessage from './ToastMessage.vue'
+ import { i18n } from '../../js/locale'
export default {
methods: {
addToast(data) {
+ ToastMessage.i18n = i18n
const msg = Vue.extend(ToastMessage)
const instance = new msg({ propsData: { data: data } })
instance.$mount()
diff --git a/src/resources/vue/Widgets/ToastMessage.vue b/src/resources/vue/Widgets/ToastMessage.vue
--- a/src/resources/vue/Widgets/ToastMessage.vue
+++ b/src/resources/vue/Widgets/ToastMessage.vue
@@ -6,8 +6,8 @@
<svg-icon icon="exclamation-circle" v-else-if="data.type == 'error'"></svg-icon>
<svg-icon icon="exclamation-circle" v-else-if="data.type == 'warning'"></svg-icon>
<svg-icon :icon="data.icon" v-else-if="data.type == 'custom' && data.icon"></svg-icon>
- <strong>{{ data.title || title() }}</strong>
- <button type="button" class="close" data-dismiss="toast" aria-label="Close">
+ <strong>{{ data.title || $t('msg.' + data.type) }}</strong>
+ <button type="button" class="close" data-dismiss="toast" :aria-label="$t('btn.close')">
<span aria-hidden="true">&times;</span>
</button>
</div>
@@ -52,19 +52,6 @@
return this.data.titleClassName || ''
}
},
- title() {
- const type = this.data.type
- switch (type) {
- case 'info':
- return 'Information';
- case 'error':
- case 'warning':
- case 'success':
- return type.charAt(0).toUpperCase() + type.slice(1)
- }
-
- return ''
- },
toastClassName() {
return 'toast hide toast-' + this.data.type
+ (this.data.className ? ' ' + this.data.className : '')
diff --git a/src/resources/vue/Widgets/TransactionLog.vue b/src/resources/vue/Widgets/TransactionLog.vue
--- a/src/resources/vue/Widgets/TransactionLog.vue
+++ b/src/resources/vue/Widgets/TransactionLog.vue
@@ -3,11 +3,11 @@
<table class="table table-sm m-0 transactions">
<thead class="thead-light">
<tr>
- <th scope="col">Date</th>
- <th scope="col" v-if="isAdmin">User</th>
+ <th scope="col">{{ $t('form.date') }}</th>
+ <th scope="col" v-if="isAdmin">{{ $t('form.user') }}</th>
<th scope="col"></th>
- <th scope="col">Description</th>
- <th scope="col" class="price">Amount</th>
+ <th scope="col">{{ $t('form.description') }}</th>
+ <th scope="col" class="price">{{ $t('form.amount') }}</th>
</tr>
</thead>
<tbody>
@@ -28,12 +28,12 @@
</tbody>
<tfoot class="table-fake-body">
<tr>
- <td :colspan="isAdmin ? 5 : 4">There are no transactions for this account.</td>
+ <td :colspan="isAdmin ? 5 : 4">{{ $t('wallet.transactions-none') }}</td>
</tr>
</tfoot>
</table>
<div class="text-center p-3" id="transactions-loader" v-if="hasMore">
- <button class="btn btn-secondary" @click="loadLog(true)">Load more</button>
+ <button class="btn btn-secondary" @click="loadLog(true)">{{ $t('nav.more') }}</button>
</div>
</div>
</template>
diff --git a/src/resources/vue/Widgets/UserSearch.vue b/src/resources/vue/Widgets/UserSearch.vue
--- a/src/resources/vue/Widgets/UserSearch.vue
+++ b/src/resources/vue/Widgets/UserSearch.vue
@@ -3,19 +3,19 @@
<div class="card-body">
<form @submit.prevent="searchUser" class="row justify-content-center">
<div class="input-group col-sm-8">
- <input class="form-control" type="text" placeholder="User ID, email or domain" v-model="search">
+ <input class="form-control" type="text" :placeholder="$t('user.search-pl')" v-model="search">
<div class="input-group-append">
- <button type="submit" class="btn btn-primary"><svg-icon icon="search"></svg-icon> Search</button>
+ <button type="submit" class="btn btn-primary"><svg-icon icon="search"></svg-icon> {{ $t('btn.search') }}</button>
</div>
</div>
</form>
<table v-if="users.length" class="table table-sm table-hover mt-4">
<thead class="thead-light">
<tr>
- <th scope="col">Primary Email</th>
- <th scope="col">ID</th>
- <th scope="col" class="d-none d-md-table-cell">Created</th>
- <th scope="col" class="d-none d-md-table-cell">Deleted</th>
+ <th scope="col">{{ $t('form.primary-email') }}</th>
+ <th scope="col">{{ $t('form.id') }}</th>
+ <th scope="col" class="d-none d-md-table-cell">{{ $t('form.created') }}</th>
+ <th scope="col" class="d-none d-md-table-cell">{{ $t('form.deleted') }}</th>
</tr>
</thead>
<tbody>
diff --git a/src/tests/Browser/Admin/DistlistTest.php b/src/tests/Browser/Admin/DistlistTest.php
--- a/src/tests/Browser/Admin/DistlistTest.php
+++ b/src/tests/Browser/Admin/DistlistTest.php
@@ -80,7 +80,7 @@
->assertSeeIn('@distlist-info .card-title', $group->email)
->with('@distlist-info form', function (Browser $browser) use ($group) {
$browser->assertElementsCount('.row', 3)
- ->assertSeeIn('.row:nth-child(1) label', 'ID (Created at)')
+ ->assertSeeIn('.row:nth-child(1) label', 'ID (Created)')
->assertSeeIn('.row:nth-child(1) #distlistid', "{$group->id} ({$group->created_at})")
->assertSeeIn('.row:nth-child(2) label', 'Status')
->assertSeeIn('.row:nth-child(2) #status.text-danger', 'Not Ready')
diff --git a/src/tests/Browser/Admin/DomainTest.php b/src/tests/Browser/Admin/DomainTest.php
--- a/src/tests/Browser/Admin/DomainTest.php
+++ b/src/tests/Browser/Admin/DomainTest.php
@@ -68,7 +68,7 @@
->assertSeeIn('@domain-info .card-title', 'kolab.org')
->with('@domain-info form', function (Browser $browser) use ($domain) {
$browser->assertElementsCount('.row', 2)
- ->assertSeeIn('.row:nth-child(1) label', 'ID (Created at)')
+ ->assertSeeIn('.row:nth-child(1) label', 'ID (Created)')
->assertSeeIn('.row:nth-child(1) #domainid', "{$domain->id} ({$domain->created_at})")
->assertSeeIn('.row:nth-child(2) label', 'Status')
->assertSeeIn('.row:nth-child(2) #status span.text-success', 'Active');
diff --git a/src/tests/Browser/Admin/UserTest.php b/src/tests/Browser/Admin/UserTest.php
--- a/src/tests/Browser/Admin/UserTest.php
+++ b/src/tests/Browser/Admin/UserTest.php
@@ -100,15 +100,15 @@
$browser->assertElementsCount('.row', 7)
->assertSeeIn('.row:nth-child(1) label', 'Managed by')
->assertSeeIn('.row:nth-child(1) #manager a', 'john@kolab.org')
- ->assertSeeIn('.row:nth-child(2) label', 'ID (Created at)')
+ ->assertSeeIn('.row:nth-child(2) label', 'ID (Created)')
->assertSeeIn('.row:nth-child(2) #userid', "{$jack->id} ({$jack->created_at})")
->assertSeeIn('.row:nth-child(3) label', 'Status')
->assertSeeIn('.row:nth-child(3) #status span.text-success', 'Active')
- ->assertSeeIn('.row:nth-child(4) label', 'First name')
+ ->assertSeeIn('.row:nth-child(4) label', 'First Name')
->assertSeeIn('.row:nth-child(4) #first_name', 'Jack')
- ->assertSeeIn('.row:nth-child(5) label', 'Last name')
+ ->assertSeeIn('.row:nth-child(5) label', 'Last Name')
->assertSeeIn('.row:nth-child(5) #last_name', 'Daniels')
- ->assertSeeIn('.row:nth-child(6) label', 'External email')
+ ->assertSeeIn('.row:nth-child(6) label', 'External Email')
->assertMissing('.row:nth-child(6) #external_email a')
->assertSeeIn('.row:nth-child(7) label', 'Country')
->assertSeeIn('.row:nth-child(7) #country', 'United States');
@@ -199,19 +199,19 @@
$ext_email = $john->getSetting('external_email');
$browser->assertElementsCount('.row', 9)
- ->assertSeeIn('.row:nth-child(1) label', 'ID (Created at)')
+ ->assertSeeIn('.row:nth-child(1) label', 'ID (Created)')
->assertSeeIn('.row:nth-child(1) #userid', "{$john->id} ({$john->created_at})")
->assertSeeIn('.row:nth-child(2) label', 'Status')
->assertSeeIn('.row:nth-child(2) #status span.text-success', 'Active')
- ->assertSeeIn('.row:nth-child(3) label', 'First name')
+ ->assertSeeIn('.row:nth-child(3) label', 'First Name')
->assertSeeIn('.row:nth-child(3) #first_name', 'John')
- ->assertSeeIn('.row:nth-child(4) label', 'Last name')
+ ->assertSeeIn('.row:nth-child(4) label', 'Last Name')
->assertSeeIn('.row:nth-child(4) #last_name', 'Doe')
->assertSeeIn('.row:nth-child(5) label', 'Organization')
->assertSeeIn('.row:nth-child(5) #organization', 'Kolab Developers')
->assertSeeIn('.row:nth-child(6) label', 'Phone')
->assertSeeIn('.row:nth-child(6) #phone', $john->getSetting('phone'))
- ->assertSeeIn('.row:nth-child(7) label', 'External email')
+ ->assertSeeIn('.row:nth-child(7) label', 'External Email')
->assertSeeIn('.row:nth-child(7) #external_email a', $ext_email)
->assertAttribute('.row:nth-child(7) #external_email a', 'href', "mailto:$ext_email")
->assertSeeIn('.row:nth-child(8) label', 'Address')
@@ -319,7 +319,7 @@
// Assert main info box content
$browser->assertSeeIn('@user-info .card-title', $ned->email)
->with('@user-info form', function (Browser $browser) use ($ned) {
- $browser->assertSeeIn('.row:nth-child(2) label', 'ID (Created at)')
+ $browser->assertSeeIn('.row:nth-child(2) label', 'ID (Created)')
->assertSeeIn('.row:nth-child(2) #userid', "{$ned->id} ({$ned->created_at})");
});
@@ -401,7 +401,7 @@
->click('@user-info #external_email button')
// Test dialog content, and closing it with Cancel button
->with(new Dialog('#email-dialog'), function (Browser $browser) {
- $browser->assertSeeIn('@title', 'External email')
+ $browser->assertSeeIn('@title', 'External Email')
->assertFocused('@body input')
->assertValue('@body input', 'john.doe.external@gmail.com')
->assertSeeIn('@button-cancel', 'Cancel')
diff --git a/src/tests/Browser/Pages/Reseller/Invitations.php b/src/tests/Browser/Pages/Reseller/Invitations.php
--- a/src/tests/Browser/Pages/Reseller/Invitations.php
+++ b/src/tests/Browser/Pages/Reseller/Invitations.php
@@ -27,7 +27,7 @@
{
$browser->assertPathIs($this->url())
->waitUntilMissing('@app .app-loader')
- ->assertSeeIn('#invitations .card-title', 'Signup Invitations');
+ ->assertSeeIn('#invitations .card-title', 'Signup invitations');
}
/**
diff --git a/src/tests/Browser/Pages/UserList.php b/src/tests/Browser/Pages/UserList.php
--- a/src/tests/Browser/Pages/UserList.php
+++ b/src/tests/Browser/Pages/UserList.php
@@ -27,7 +27,7 @@
{
$browser->assertPathIs($this->url())
->waitUntilMissing('@app .app-loader')
- ->assertSeeIn('#user-list .card-title', 'User Accounts');
+ ->assertSeeIn('#user-list .card-title', 'User accounts');
}
/**
diff --git a/src/tests/Browser/PaymentMollieTest.php b/src/tests/Browser/PaymentMollieTest.php
--- a/src/tests/Browser/PaymentMollieTest.php
+++ b/src/tests/Browser/PaymentMollieTest.php
@@ -129,14 +129,14 @@
->assertMissing('@body #mandate-form .alert')
->click('@main #mandate-form button')
->with(new Dialog('@payment-dialog'), function (Browser $browser) {
- $browser->assertSeeIn('@title', 'Add auto-payment')
+ $browser->assertSeeIn('@title', 'Set up auto-payment')
->waitFor('#payment-method-selection #creditcard')
->assertMissing('#payment-method-selection #paypal')
->assertMissing('#payment-method-selection #banktransfer')
->click('#creditcard');
})
->with(new Dialog('@payment-dialog'), function (Browser $browser) {
- $browser->assertSeeIn('@title', 'Add auto-payment')
+ $browser->assertSeeIn('@title', 'Set up auto-payment')
->assertSeeIn('@body label[for="mandate_amount"]', 'Fill up by')
->assertValue('@body #mandate_amount', PaymentProvider::MIN_AMOUNT / 100)
->assertSeeIn('@body label[for="mandate_balance"]', 'when account balance is below') // phpcs:ignore
@@ -250,12 +250,12 @@
->assertMissing('@body #mandate-form .alert')
->click('@main #mandate-form button')
->with(new Dialog('@payment-dialog'), function (Browser $browser) {
- $browser->assertSeeIn('@title', 'Add auto-payment')
+ $browser->assertSeeIn('@title', 'Set up auto-payment')
->waitFor('#payment-method-selection #creditcard')
->click('#creditcard');
})
->with(new Dialog('@payment-dialog'), function (Browser $browser) {
- $browser->assertSeeIn('@title', 'Add auto-payment')
+ $browser->assertSeeIn('@title', 'Set up auto-payment')
->assertSeeIn('@button-cancel', 'Cancel')
->assertSeeIn('@button-action', 'Continue')
// Submit valid data
@@ -280,12 +280,12 @@
// Create a new mandate
->click('@main #mandate-form button')
->with(new Dialog('@payment-dialog'), function (Browser $browser) {
- $browser->assertSeeIn('@title', 'Add auto-payment')
+ $browser->assertSeeIn('@title', 'Set up auto-payment')
->waitFor('#payment-method-selection #creditcard')
->click('#creditcard');
})
->with(new Dialog('@payment-dialog'), function (Browser $browser) {
- $browser->assertSeeIn('@title', 'Add auto-payment')
+ $browser->assertSeeIn('@title', 'Set up auto-payment')
->assertSeeIn('@button-cancel', 'Cancel')
->assertSeeIn('@button-action', 'Continue')
// Submit valid data
diff --git a/src/tests/Browser/PaymentStripeTest.php b/src/tests/Browser/PaymentStripeTest.php
--- a/src/tests/Browser/PaymentStripeTest.php
+++ b/src/tests/Browser/PaymentStripeTest.php
@@ -116,14 +116,14 @@
->assertMissing('@body #mandate-form .alert')
->click('@main #mandate-form button')
->with(new Dialog('@payment-dialog'), function (Browser $browser) {
- $browser->assertSeeIn('@title', 'Add auto-payment')
+ $browser->assertSeeIn('@title', 'Set up auto-payment')
->waitFor('#payment-method-selection #creditcard')
->assertMissing('#payment-method-selection #paypal')
->assertMissing('#payment-method-selection #banktransfer')
->click('#creditcard');
})
->with(new Dialog('@payment-dialog'), function (Browser $browser) {
- $browser->assertSeeIn('@title', 'Add auto-payment')
+ $browser->assertSeeIn('@title', 'Set up auto-payment')
->assertSeeIn('@body label[for="mandate_amount"]', 'Fill up by')
->assertValue('@body #mandate_amount', PaymentProvider::MIN_AMOUNT / 100)
->assertSeeIn('@body label[for="mandate_balance"]', 'when account balance is below') // phpcs:ignore
diff --git a/src/tests/Browser/Reseller/DistlistTest.php b/src/tests/Browser/Reseller/DistlistTest.php
--- a/src/tests/Browser/Reseller/DistlistTest.php
+++ b/src/tests/Browser/Reseller/DistlistTest.php
@@ -80,7 +80,7 @@
->assertSeeIn('@distlist-info .card-title', $group->email)
->with('@distlist-info form', function (Browser $browser) use ($group) {
$browser->assertElementsCount('.row', 3)
- ->assertSeeIn('.row:nth-child(1) label', 'ID (Created at)')
+ ->assertSeeIn('.row:nth-child(1) label', 'ID (Created)')
->assertSeeIn('.row:nth-child(1) #distlistid', "{$group->id} ({$group->created_at})")
->assertSeeIn('.row:nth-child(2) label', 'Status')
->assertSeeIn('.row:nth-child(2) #status.text-danger', 'Not Ready')
diff --git a/src/tests/Browser/Reseller/DomainTest.php b/src/tests/Browser/Reseller/DomainTest.php
--- a/src/tests/Browser/Reseller/DomainTest.php
+++ b/src/tests/Browser/Reseller/DomainTest.php
@@ -69,7 +69,7 @@
->assertSeeIn('@domain-info .card-title', 'kolab.org')
->with('@domain-info form', function (Browser $browser) use ($domain) {
$browser->assertElementsCount('.row', 2)
- ->assertSeeIn('.row:nth-child(1) label', 'ID (Created at)')
+ ->assertSeeIn('.row:nth-child(1) label', 'ID (Created)')
->assertSeeIn('.row:nth-child(1) #domainid', "{$domain->id} ({$domain->created_at})")
->assertSeeIn('.row:nth-child(2) label', 'Status')
->assertSeeIn('.row:nth-child(2) #status span.text-success', 'Active');
diff --git a/src/tests/Browser/Reseller/UserTest.php b/src/tests/Browser/Reseller/UserTest.php
--- a/src/tests/Browser/Reseller/UserTest.php
+++ b/src/tests/Browser/Reseller/UserTest.php
@@ -97,15 +97,15 @@
$browser->assertElementsCount('.row', 7)
->assertSeeIn('.row:nth-child(1) label', 'Managed by')
->assertSeeIn('.row:nth-child(1) #manager a', 'john@kolab.org')
- ->assertSeeIn('.row:nth-child(2) label', 'ID (Created at)')
+ ->assertSeeIn('.row:nth-child(2) label', 'ID (Created)')
->assertSeeIn('.row:nth-child(2) #userid', "{$jack->id} ({$jack->created_at})")
->assertSeeIn('.row:nth-child(3) label', 'Status')
->assertSeeIn('.row:nth-child(3) #status span.text-success', 'Active')
- ->assertSeeIn('.row:nth-child(4) label', 'First name')
+ ->assertSeeIn('.row:nth-child(4) label', 'First Name')
->assertSeeIn('.row:nth-child(4) #first_name', 'Jack')
- ->assertSeeIn('.row:nth-child(5) label', 'Last name')
+ ->assertSeeIn('.row:nth-child(5) label', 'Last Name')
->assertSeeIn('.row:nth-child(5) #last_name', 'Daniels')
- ->assertSeeIn('.row:nth-child(6) label', 'External email')
+ ->assertSeeIn('.row:nth-child(6) label', 'External Email')
->assertMissing('.row:nth-child(6) #external_email a')
->assertSeeIn('.row:nth-child(7) label', 'Country')
->assertSeeIn('.row:nth-child(7) #country', 'United States');
@@ -196,19 +196,19 @@
$ext_email = $john->getSetting('external_email');
$browser->assertElementsCount('.row', 9)
- ->assertSeeIn('.row:nth-child(1) label', 'ID (Created at)')
+ ->assertSeeIn('.row:nth-child(1) label', 'ID (Created)')
->assertSeeIn('.row:nth-child(1) #userid', "{$john->id} ({$john->created_at})")
->assertSeeIn('.row:nth-child(2) label', 'Status')
->assertSeeIn('.row:nth-child(2) #status span.text-success', 'Active')
- ->assertSeeIn('.row:nth-child(3) label', 'First name')
+ ->assertSeeIn('.row:nth-child(3) label', 'First Name')
->assertSeeIn('.row:nth-child(3) #first_name', 'John')
- ->assertSeeIn('.row:nth-child(4) label', 'Last name')
+ ->assertSeeIn('.row:nth-child(4) label', 'Last Name')
->assertSeeIn('.row:nth-child(4) #last_name', 'Doe')
->assertSeeIn('.row:nth-child(5) label', 'Organization')
->assertSeeIn('.row:nth-child(5) #organization', 'Kolab Developers')
->assertSeeIn('.row:nth-child(6) label', 'Phone')
->assertSeeIn('.row:nth-child(6) #phone', $john->getSetting('phone'))
- ->assertSeeIn('.row:nth-child(7) label', 'External email')
+ ->assertSeeIn('.row:nth-child(7) label', 'External Email')
->assertSeeIn('.row:nth-child(7) #external_email a', $ext_email)
->assertAttribute('.row:nth-child(7) #external_email a', 'href', "mailto:$ext_email")
->assertSeeIn('.row:nth-child(8) label', 'Address')
@@ -296,7 +296,7 @@
// Assert main info box content
$browser->assertSeeIn('@user-info .card-title', $ned->email)
->with('@user-info form', function (Browser $browser) use ($ned) {
- $browser->assertSeeIn('.row:nth-child(2) label', 'ID (Created at)')
+ $browser->assertSeeIn('.row:nth-child(2) label', 'ID (Created)')
->assertSeeIn('.row:nth-child(2) #userid', "{$ned->id} ({$ned->created_at})");
});
@@ -376,7 +376,7 @@
->click('@user-info #external_email button')
// Test dialog content, and closing it with Cancel button
->with(new Dialog('#email-dialog'), function (Browser $browser) {
- $browser->assertSeeIn('@title', 'External email')
+ $browser->assertSeeIn('@title', 'External Email')
->assertFocused('@body input')
->assertValue('@body input', 'john.doe.external@gmail.com')
->assertSeeIn('@button-cancel', 'Cancel')
diff --git a/src/tests/Browser/UserProfileTest.php b/src/tests/Browser/UserProfileTest.php
--- a/src/tests/Browser/UserProfileTest.php
+++ b/src/tests/Browser/UserProfileTest.php
@@ -76,15 +76,15 @@
$browser->assertFocused('div.row:nth-child(2) input')
->assertSeeIn('div.row:nth-child(1) label', 'Customer No.')
->assertSeeIn('div.row:nth-child(1) .form-control-plaintext', $user->id)
- ->assertSeeIn('div.row:nth-child(2) label', 'First name')
+ ->assertSeeIn('div.row:nth-child(2) label', 'First Name')
->assertValue('div.row:nth-child(2) input[type=text]', $this->profile['first_name'])
- ->assertSeeIn('div.row:nth-child(3) label', 'Last name')
+ ->assertSeeIn('div.row:nth-child(3) label', 'Last Name')
->assertValue('div.row:nth-child(3) input[type=text]', $this->profile['last_name'])
->assertSeeIn('div.row:nth-child(4) label', 'Organization')
->assertValue('div.row:nth-child(4) input[type=text]', $this->profile['organization'])
->assertSeeIn('div.row:nth-child(5) label', 'Phone')
->assertValue('div.row:nth-child(5) input[type=text]', $this->profile['phone'])
- ->assertSeeIn('div.row:nth-child(6) label', 'External email')
+ ->assertSeeIn('div.row:nth-child(6) label', 'External Email')
->assertValue('div.row:nth-child(6) input[type=text]', $this->profile['external_email'])
->assertSeeIn('div.row:nth-child(7) label', 'Address')
->assertValue('div.row:nth-child(7) textarea', $this->profile['billing_address'])
@@ -92,7 +92,7 @@
->assertValue('div.row:nth-child(8) select', $this->profile['country'])
->assertSeeIn('div.row:nth-child(9) label', 'Password')
->assertValue('div.row:nth-child(9) input[type=password]', '')
- ->assertSeeIn('div.row:nth-child(10) label', 'Confirm password')
+ ->assertSeeIn('div.row:nth-child(10) label', 'Confirm Password')
->assertValue('div.row:nth-child(10) input[type=password]', '')
->assertSeeIn('button[type=submit]', 'Submit');
diff --git a/src/tests/Browser/UsersTest.php b/src/tests/Browser/UsersTest.php
--- a/src/tests/Browser/UsersTest.php
+++ b/src/tests/Browser/UsersTest.php
@@ -143,16 +143,16 @@
$browser->assertSeeIn('div.row:nth-child(1) label', 'Status')
->assertSeeIn('div.row:nth-child(1) #status', 'Active')
->assertFocused('div.row:nth-child(2) input')
- ->assertSeeIn('div.row:nth-child(2) label', 'First name')
+ ->assertSeeIn('div.row:nth-child(2) label', 'First Name')
->assertValue('div.row:nth-child(2) input[type=text]', $this->profile['first_name'])
- ->assertSeeIn('div.row:nth-child(3) label', 'Last name')
+ ->assertSeeIn('div.row:nth-child(3) label', 'Last Name')
->assertValue('div.row:nth-child(3) input[type=text]', $this->profile['last_name'])
->assertSeeIn('div.row:nth-child(4) label', 'Organization')
->assertValue('div.row:nth-child(4) input[type=text]', $this->profile['organization'])
->assertSeeIn('div.row:nth-child(5) label', 'Email')
->assertValue('div.row:nth-child(5) input[type=text]', 'john@kolab.org')
->assertDisabled('div.row:nth-child(5) input[type=text]')
- ->assertSeeIn('div.row:nth-child(6) label', 'Email aliases')
+ ->assertSeeIn('div.row:nth-child(6) label', 'Email Aliases')
->assertVisible('div.row:nth-child(6) .list-input')
->with(new ListInput('#aliases'), function (Browser $browser) {
$browser->assertListInputValue(['john.doe@kolab.org'])
@@ -160,7 +160,7 @@
})
->assertSeeIn('div.row:nth-child(7) label', 'Password')
->assertValue('div.row:nth-child(7) input[type=password]', '')
- ->assertSeeIn('div.row:nth-child(8) label', 'Confirm password')
+ ->assertSeeIn('div.row:nth-child(8) label', 'Confirm Password')
->assertValue('div.row:nth-child(8) input[type=password]', '')
->assertSeeIn('button[type=submit]', 'Submit')
// Clear some fields and submit
@@ -340,16 +340,16 @@
->with('@form', function (Browser $browser) {
// Assert form content
$browser->assertFocused('div.row:nth-child(1) input')
- ->assertSeeIn('div.row:nth-child(1) label', 'First name')
+ ->assertSeeIn('div.row:nth-child(1) label', 'First Name')
->assertValue('div.row:nth-child(1) input[type=text]', '')
- ->assertSeeIn('div.row:nth-child(2) label', 'Last name')
+ ->assertSeeIn('div.row:nth-child(2) label', 'Last Name')
->assertValue('div.row:nth-child(2) input[type=text]', '')
->assertSeeIn('div.row:nth-child(3) label', 'Organization')
->assertValue('div.row:nth-child(3) input[type=text]', '')
->assertSeeIn('div.row:nth-child(4) label', 'Email')
->assertValue('div.row:nth-child(4) input[type=text]', '')
->assertEnabled('div.row:nth-child(4) input[type=text]')
- ->assertSeeIn('div.row:nth-child(5) label', 'Email aliases')
+ ->assertSeeIn('div.row:nth-child(5) label', 'Email Aliases')
->assertVisible('div.row:nth-child(5) .list-input')
->with(new ListInput('#aliases'), function (Browser $browser) {
$browser->assertListInputValue([])
@@ -357,7 +357,7 @@
})
->assertSeeIn('div.row:nth-child(6) label', 'Password')
->assertValue('div.row:nth-child(6) input[type=password]', '')
- ->assertSeeIn('div.row:nth-child(7) label', 'Confirm password')
+ ->assertSeeIn('div.row:nth-child(7) label', 'Confirm Password')
->assertValue('div.row:nth-child(7) input[type=password]', '')
->assertSeeIn('div.row:nth-child(8) label', 'Package')
// assert packages list widget, select "Lite Account"
diff --git a/src/tests/Feature/Controller/WalletsTest.php b/src/tests/Feature/Controller/WalletsTest.php
--- a/src/tests/Feature/Controller/WalletsTest.php
+++ b/src/tests/Feature/Controller/WalletsTest.php
@@ -80,11 +80,14 @@
$this->assertRegExp('/\(2 months 2 weeks\)/', $notice);
+ // Change locale to make sure the text is localized by Carbon
+ \app()->setLocale('de');
+
// test "almost 2 years"
$wallet->balance = 999 * 23.5;
$notice = $method->invoke($controller, $wallet);
- $this->assertRegExp('/\(1 year 11 months\)/', $notice);
+ $this->assertRegExp('/\(1 Jahr 11 Monate\)/', $notice);
// Old entitlements, 100% discount
$this->backdateEntitlements($wallet->entitlements, Carbon::now()->subDays(40));

File Metadata

Mime Type
text/plain
Expires
Fri, Apr 3, 2:55 AM (2 d, 1 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18820894
Default Alt Text
D2581.1775184932.diff (168 KB)

Event Timeline