diff --git a/pinry-spa/package.json b/pinry-spa/package.json index ba5f39e..75348ab 100644 --- a/pinry-spa/package.json +++ b/pinry-spa/package.json @@ -13,6 +13,7 @@ "core-js": "^3.3.2", "register-service-worker": "^1.6.2", "vue": "^2.6.10", + "vue-i18n": "8", "vue-masonry": "^0.11.8", "vue-router": "^3.1.3" }, diff --git a/pinry-spa/src/assets/locales/en.json b/pinry-spa/src/assets/locales/en.json new file mode 100644 index 0000000..7d805d3 --- /dev/null +++ b/pinry-spa/src/assets/locales/en.json @@ -0,0 +1,79 @@ +{ + "loginTitle": "Login", + "loginButton": "Login", + "closeButton": "Close", + "end": "End", + "bookmarkletLink": "BookmarkletLink", + "createLink": "Create", + "pinLink": "Pin", + "boardLink": "Board", + "myLink": "My", + "boardsLink": "Boards", + "pinsLink": "Pins", + "profileLink": "Profile", + "browserExtensionsLink": "Browser Extensions", + "chromeLink": "Chrome", + "firefoxLink": "Firefox", + "signUpLink": "Sign up", + "logInLink": "Log in", + "logOutLink": "Log out", + "signUpTitle": "Sign Up", + "registerButton": "Register", + "pageNotFound": "Oops! Page Not Found", + "error404": "Error 404", + "pinsInBoard": "Pins in board: ", + "isPrivateCheckbox": "is private", + "createBoardButton": "Create Board", + "saveChangesButton": "Save Changes", + "pinnedByTitle": "Pinned by ", + "sourceButton": "Source", + "originalImageButton": "Original Image", + "permalinkButton": "Permalink", + "pinnedByInfo": "Pinned by", + "sourceLink": "Source", + "userProfileCardContent": "Yet another Pinry user.", + "pinsUserProfileCardLink": "Pins", + "boardsUserProfileCardLink": "Boards", + "profileUserProfileCardLink": "Profile", + "tokenUserProfileCardTitle": "Token", + "tokenUserProfileCardContent": "Your Token is:", + "pleaseReadTokenUserProfileCardContent": "Please read ", + "forMoreDetailsParagraph": " for more detail to know how to use it.", + "drfApiDocumentationLink": "DRF API Documentation", + "searchButton": "Search", + "noResultsFound": "No results found", + "SearchPanelBoardOption": "Board", + "SearchPanelTagOption": "Tag", + "Add2BoardModalCardTitle": "Add Pin to Board", + "Add2BoardModalCardButton": "Add Pin to Board", + "FileUploadDescription": "Drop your files here or click to upload", + "filterSelectCreateNewBoardButton": "Create New Board", + "pinCreateModalEmptySlot": "There are no items", + "pinCreateModalCreatePinButton": "Create Pin", + "pinCreateModalSaveChangesButton": "Save Changes", + "passwordSignUpPlaceholder": "Your password", + "passwordLoginPlaceholder": "Your password", + "boardNamePlaceholder": "board name", + "usernamePlaceholder": "Your Username", + "emailPlaceholder": "Your email", + "repeatPasswordInputPlaceholder": "Your password again", + "chooseFilterPlaceholder": "Choose Filter", + "selectFilterPlaceholder": "select a filter then type to filter", + "searchBoardPlaceholder": "type to search board", + "filterSelectSelectBoardPlaceholder": "Type to filter or Create one", + "pinCreateModalImageURLPlaceholder": "where to fetch the image", + "pinCreateModalImageSourcePlaceholder": "where to find the pin", + "pinCreateModalImageTagsPlaceholder": "Add a tag", + "pinCreateModalImageDescriptionPlaceholder": "idea from this pin", + "emailLabel": "Email", + "usernameLabel": "Username", + "passwordLabel": "Password", + "repeatPasswordLabel": "Password repeat", + "nameLabel": "name", + "privacyOptionLabel": "Privacy Option", + "imageUrlLabel": "Image URL", + "imageSourceLabel": "Image Source", + "tagsLabel": "Tags", + "descriptionLabel": "Descripton", + "selectBoardLabel": "Select Board" +} \ No newline at end of file diff --git a/pinry-spa/src/components/BoardEdit.vue b/pinry-spa/src/components/BoardEdit.vue index 572b608..daf8145 100644 --- a/pinry-spa/src/components/BoardEdit.vue +++ b/pinry-spa/src/components/BoardEdit.vue @@ -7,57 +7,57 @@ diff --git a/pinry-spa/src/components/Boards.vue b/pinry-spa/src/components/Boards.vue index 0fbc397..1daa97e 100644 --- a/pinry-spa/src/components/Boards.vue +++ b/pinry-spa/src/components/Boards.vue @@ -38,7 +38,7 @@

{{ item.name }}

- Pins in board: {{ item.total_pins }} + {{ $t("pinsInBoard") }}{{ item.total_pins }}

diff --git a/pinry-spa/src/components/LoginForm.vue b/pinry-spa/src/components/LoginForm.vue index da82ec1..f4b8cd1 100644 --- a/pinry-spa/src/components/LoginForm.vue +++ b/pinry-spa/src/components/LoginForm.vue @@ -3,39 +3,39 @@
diff --git a/pinry-spa/src/components/PHeader.vue b/pinry-spa/src/components/PHeader.vue index 7bfd036..d4da5c7 100644 --- a/pinry-spa/src/components/PHeader.vue +++ b/pinry-spa/src/components/PHeader.vue @@ -18,24 +18,24 @@ +
+ +
@@ -129,6 +134,7 @@ export default { loggedIn: false, meta: {}, }, + langs: ['en'], }; }, computed: { @@ -139,6 +145,9 @@ export default { }, }, methods: { + setLocale(event) { + localStorage.setItem('localeCode', event.target.value); + }, toggleMenu() { this.active = !this.active; }, diff --git a/pinry-spa/src/components/PinPreview.vue b/pinry-spa/src/components/PinPreview.vue index fa572cf..ed2aff1 100644 --- a/pinry-spa/src/components/PinPreview.vue +++ b/pinry-spa/src/components/PinPreview.vue @@ -19,7 +19,7 @@
-

Pinned by {{ pinItem.author }}

+

{{ $t("pinnedByTitle") }}{{ pinItem.author }}

in  - • Source + • {{ $t("sourceLink") }}

diff --git a/pinry-spa/src/components/SignUpForm.vue b/pinry-spa/src/components/SignUpForm.vue index ebd1d87..8770c0a 100644 --- a/pinry-spa/src/components/SignUpForm.vue +++ b/pinry-spa/src/components/SignUpForm.vue @@ -3,60 +3,60 @@
diff --git a/pinry-spa/src/components/UserProfileCard.vue b/pinry-spa/src/components/UserProfileCard.vue index dd514ec..59c2cb6 100644 --- a/pinry-spa/src/components/UserProfileCard.vue +++ b/pinry-spa/src/components/UserProfileCard.vue @@ -21,7 +21,7 @@
- Yet another Pinry user. + {{ $t("userProfileCardContent") }}
@@ -34,7 +34,7 @@ icon="image" custom-size="mdi-24px"> - Pins + {{ $t("pinsUserProfileCardLink") }}
  • @@ -44,7 +44,7 @@ icon="folder-multiple-image" custom-size="mdi-24px"> - Boards + {{ $t("boardsUserProfileCardLink") }}
  • @@ -54,7 +54,7 @@ icon="account" custom-size="mdi-24px"> - Profile + {{ $t("profileUserProfileCardLink") }}
  • diff --git a/pinry-spa/src/components/noMore.vue b/pinry-spa/src/components/noMore.vue index d02463d..a75c7ad 100644 --- a/pinry-spa/src/components/noMore.vue +++ b/pinry-spa/src/components/noMore.vue @@ -1,6 +1,6 @@ diff --git a/pinry-spa/src/components/pin_edit/Add2Board.vue b/pinry-spa/src/components/pin_edit/Add2Board.vue index 66eeaf3..0d33136 100644 --- a/pinry-spa/src/components/pin_edit/Add2Board.vue +++ b/pinry-spa/src/components/pin_edit/Add2Board.vue @@ -3,7 +3,7 @@
    diff --git a/pinry-spa/src/components/pin_edit/FileUpload.vue b/pinry-spa/src/components/pin_edit/FileUpload.vue index 4fdb68d..54c6409 100644 --- a/pinry-spa/src/components/pin_edit/FileUpload.vue +++ b/pinry-spa/src/components/pin_edit/FileUpload.vue @@ -19,7 +19,7 @@ size="is-medium">

    -

    Drop your files here or click to upload

    +

    {{ $t("FileUploadDescription") }}

    diff --git a/pinry-spa/src/components/pin_edit/FilterSelect.vue b/pinry-spa/src/components/pin_edit/FilterSelect.vue index 5f647eb..59e26dc 100644 --- a/pinry-spa/src/components/pin_edit/FilterSelect.vue +++ b/pinry-spa/src/components/pin_edit/FilterSelect.vue @@ -1,12 +1,12 @@