Commit 9733422f authored by Alain St-Denis's avatar Alain St-Denis
Browse files

Initial translation setup on existing files

parent 6b815947
......@@ -84,10 +84,10 @@ SILKY_INSTALLED = env.bool("SOCIALHOME_SILKY", False)
# ------------------------------------------------------------------------------
MIDDLEWARE = (
"django.contrib.sessions.middleware.SessionMiddleware",
"django.middleware.locale.LocaleMiddleware",
"django.middleware.common.CommonMiddleware",
"django.middleware.csrf.CsrfViewMiddleware",
"django.contrib.auth.middleware.AuthenticationMiddleware",
"django.middleware.locale.LocaleMiddleware",
"django.contrib.messages.middleware.MessageMiddleware",
"django.middleware.clickjacking.XFrameOptionsMiddleware",
"django.contrib.sites.middleware.CurrentSiteMiddleware",
......
......@@ -69,7 +69,7 @@ urlpatterns = [
url(r"^bookmarklet/", ContentCreateView.as_view(), name="bookmarklet"),
# JavaScript translations
path("jsi18n/", JavaScriptCatalog.as_view(packages=['socialhome']), name="javascript-catalog"),
path("jsi18n/", JavaScriptCatalog.as_view(packages=['socialhome'], domain="django") , name="javascript-catalog"),
# Django URLs in JS
url(r"^jsreverse/$", urls_js, name="js_reverse"),
......
......@@ -776,6 +776,14 @@
"jsdom-global": "^3.0.2",
"mocha": "^6.2.2",
"mochapack": "^1.1.13"
},
"dependencies": {
"jsdom-global": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/jsdom-global/-/jsdom-global-3.0.2.tgz",
"integrity": "sha1-a9KZwTsMRiay2iwDk81DhdYGrLk=",
"dev": true
}
}
},
"@vue/cli-plugin-vuex": {
......@@ -6310,7 +6318,8 @@
"ansi-regex": {
"version": "2.1.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"aproba": {
"version": "1.2.0",
......@@ -6331,12 +6340,14 @@
"balanced-match": {
"version": "1.0.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
......@@ -6351,17 +6362,20 @@
"code-point-at": {
"version": "1.1.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"concat-map": {
"version": "0.0.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"console-control-strings": {
"version": "1.1.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"core-util-is": {
"version": "1.0.2",
......@@ -6478,7 +6492,8 @@
"inherits": {
"version": "2.0.4",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"ini": {
"version": "1.3.5",
......@@ -6490,6 +6505,7 @@
"version": "1.0.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
......@@ -6504,6 +6520,7 @@
"version": "3.0.4",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
......@@ -6511,12 +6528,14 @@
"minimist": {
"version": "1.2.5",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"minipass": {
"version": "2.9.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"safe-buffer": "^5.1.2",
"yallist": "^3.0.0"
......@@ -6535,6 +6554,7 @@
"version": "0.5.3",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"minimist": "^1.2.5"
}
......@@ -6596,7 +6616,8 @@
"npm-normalize-package-bin": {
"version": "1.0.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"npm-packlist": {
"version": "1.4.8",
......@@ -6624,7 +6645,8 @@
"number-is-nan": {
"version": "1.0.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"object-assign": {
"version": "4.1.1",
......@@ -6636,6 +6658,7 @@
"version": "1.4.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"wrappy": "1"
}
......@@ -6713,7 +6736,8 @@
"safe-buffer": {
"version": "5.1.2",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"safer-buffer": {
"version": "2.1.2",
......@@ -6749,6 +6773,7 @@
"version": "1.0.2",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
......@@ -6768,6 +6793,7 @@
"version": "3.0.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"ansi-regex": "^2.0.0"
}
......@@ -6811,12 +6837,14 @@
"wrappy": {
"version": "1.0.2",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"yallist": {
"version": "3.1.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
}
}
},
......
......@@ -31,7 +31,7 @@ export default {
return true
},
translations() {
return {reply: gettext("reply")}
return {reply: gettext("Reply")}
},
},
}
......
......@@ -20,10 +20,10 @@
<div class="mt-1 grid-item-bar-links">
<template v-if="content.user_is_author">
<a :href="updateUrl">
<i class="fa fa-pencil" title="Update" aria-label="Update" />
<i class="fa fa-pencil" :title="translations.update" :aria-label="translations.update" />
</a>
<a :href="deleteUrl">
<i class="fa fa-remove" title="Delete" aria-label="Delete" />
<i class="fa fa-remove" :title="translations.delete" :aria-label="translations.delete" />
</a>
</template>
</div>
......@@ -73,6 +73,12 @@ const StreamElement = {
updateUrl() {
return Urls["content:update"]({pk: this.content.id})
},
translations() {
return {
delete: gettext("Delete"),
update: gettext("Update"),
}
},
},
mounted() {
this.layoutAfterTwitterOEmbeds()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment