Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement i18n using vue-i18n #1090

Merged
merged 14 commits into from
Oct 3, 2021
Merged

Implement i18n using vue-i18n #1090

merged 14 commits into from
Oct 3, 2021

Conversation

s-sasaki-0529
Copy link
Contributor

Hi! I implemented i18n using vue-i18n! (issue #711)

I did the following

  • Install and setup vue-i18n
  • Get the user's language from the window object
  • Display English or Japanese based on the user's language

If other contributors want to add translations to other languages, all they have to do is to add them inside the <i18n> block.

スクリーンショット 2021-10-02 22 19 14

@alfg
Copy link
Owner

alfg commented Oct 2, 2021

Thank you! I will review today and merge if all is good.

@alfg
Copy link
Owner

alfg commented Oct 3, 2021

Hey @s-sasaki-0529, it looks good. However, it seems the tests have failed if you can address those before we merge.

Thanks!

@s-sasaki-0529
Copy link
Contributor Author

@alfg Oh, There was no i18n injection into the unit tests, but it's fixed!

@alfg alfg merged commit aa886e0 into alfg:master Oct 3, 2021
@alfg
Copy link
Owner

alfg commented Oct 3, 2021

Thank you! Nice work!

This was referenced Oct 3, 2021
Daxin-H added a commit to Daxin-H/opendrinks that referenced this pull request Oct 7, 2021
commit 763ed95
Author: Subhrakanti Dasgupta <subhrakanti.dasgupta@gmail.com>
Date:   Fri Oct 8 01:12:24 2021 +0530

    Added a recipe for milk tea. (alfg#1130)

commit 8525e7f
Author: theishanbh <91272949+theishanbh@users.noreply.github.com>
Date:   Fri Oct 8 01:10:52 2021 +0530

    hindi translation added (alfg#1132)

    Co-authored-by: ishanbh <yojaydon@gmail.com>

commit 2312e86
Author: theishanbh <91272949+theishanbh@users.noreply.github.com>
Date:   Fri Oct 8 01:09:54 2021 +0530

    salty dog added (alfg#1131)

    Co-authored-by: ishanbh <yojaydon@gmail.com>

commit 50d93c3
Author: Torfab <torfab94@gmail.com>
Date:   Thu Oct 7 04:08:01 2021 +0200

    Changed Share style in multiple buttons (alfg#1099)

    * Issue#1088 ✨ Changed share button in multiple buttons style

    * added mistaken removed part in a merge conflict

commit 673840e
Author: Joe Romeo <45112027+JoeFromDenver@users.noreply.github.com>
Date:   Wed Oct 6 20:05:54 2021 -0600

    Added a Star Trek themed Fall cocktail, cheers! (alfg#1098)

    * Added a Star Trek themed Fall cocktail, cheers!

    * Added a Star Trek themed Fall cocktail, cheers! - fixed I hope

    * Added a Star Trek themed Fall cocktail, cheers! - Third times a charm

    * Deleted duplicate image

commit 3858ce6
Author: Wiki-10 <77585783+Wiki-10@users.noreply.github.com>
Date:   Wed Oct 6 19:02:09 2021 -0700

    Added horchata water as a drink (alfg#1127)

commit 748bbee
Author: Lazar <lazav94@gmail.com>
Date:   Thu Oct 7 03:59:05 2021 +0200

    Add Aqueduct cocktail (alfg#1125)

    Co-authored-by: Lazar Vasic <lazar.vasic@gastfreund.net>

commit 797d8ed
Author: PJ <43812132+pegjee@users.noreply.github.com>
Date:   Thu Oct 7 12:58:37 2021 +1100

    Milo Dinosaur (alfg#1124)

    * Create milo-dinosaur.json

    * Add files via upload

commit c4f4adb
Author: lldh <leonora.duarte@gmail.com>
Date:   Thu Oct 7 02:56:44 2021 +0100

    Add Port and tonic recipe (alfg#1120)

commit 1788a50
Author: AlexG <xelaflash@gmail.com>
Date:   Wed Oct 6 21:53:53 2021 -0400

    French translation components and views files (alfg#1117)

    * Components French Translation

    * fix i18n block for components + add translation to views

    * fix typo

commit 3fd57a9
Author: Lona.exe <39522664+JeswinSunsi@users.noreply.github.com>
Date:   Thu Oct 7 05:52:55 2021 +0400

    Add recipe for New Orleans Crusta (alfg#1116)

    * Add recipe for Crusta

    * Add image for Crusta

    * Fix json

commit 9a5591e
Author: theishanbh <91272949+theishanbh@users.noreply.github.com>
Date:   Thu Oct 7 07:16:31 2021 +0530

    mango shake recipe added (alfg#1109)

    Co-authored-by: ishanbh <yojaydon@gmail.com>

commit 16d08d8
Author: manueldose <71591743+manueldose@users.noreply.github.com>
Date:   Thu Oct 7 03:46:01 2021 +0200

    Added Californication cokctail recipe (alfg#1110)

commit 884285f
Author: bookish <44310042+bookish@users.noreply.github.com>
Date:   Wed Oct 6 21:45:33 2021 -0400

    Bookish orange carrot smoothie (alfg#1114)

    * Create pomegranate-lemon-mint

    * image to accompany pomegranate-lemon-mint.json

    * Update pomegranate-lemon-mint.json

    I hope I am doing this correctly.  Thank you for your help!

    * Update and rename pomegranate-lemon-mint

    Thank you for your help. I hope this renaming to to pomegranate-lemon-mint.json works and I am not sure what syntax errors there are. Please let me know of any more changes.  Thank you!

    * Delete pomegranate-lemon-mint.jpg

    I am going to try and submit a properly sized image.  Thank you for your help

    * image for pomegranate-lemon-mint.json

    I hope this is the correct dimensions.  Thank you for your help.  Let me know what other changes I need to make.

    * Update pomegranate-lemon-mint.json

    I think I fixed the syntax errors.  Please let me know if more changes are needed.  Thank you for your help and patience!

    * Create pomegranate-lemon-mint.json

    * Add pomegranate-lemon-mint.jpp

    * Update pomegranate-lemon-mint.json

    * Update pomegranate-lemon-mint.json

    * Create pomegranate-mint-lemon.json

    Hi, the json validator said this file is valid.  Please let me know if there are other issues.  Thank you!

    * adding pomegranate-lemonmint.json recipe

    * adding pomegranate-lemonmint image

    * Delete pomegranate-lemon-mint.json

    * Delete pomegranate-lemonmint.json

    * Delete pomegranate-mint-lemon.json

    * adding pomegranate-lemon-mint.json

    * Delete pomegranate-lemon-mint.jpg

    * Delete pomegranate-lemon-mint.jpg

    * Delete pomegranate-lemonmint resize.JPG

    * adding pomegranate-lemon-mint.jpg

    * Delete pomegranate-lemon-mint.jpg

    * pomegranate-lemon-mint.jpg

    * Delete pomegranate-lemon-mint.json

    * Delete pomegranate-lemon-mint.jpg

    * Add files via upload

    * Adding a new orange carrot smoothie drink.

    Please let me know if I need to make changes.  Thank you!! :)

    * image for orange carrot smoothie

    Thank you!

    * Delete orange-carrot-smoothie.json

commit 471e863
Author: Arianne <asm7@cin.ufpe.br>
Date:   Wed Oct 6 22:42:20 2021 -0300

    add nevada as a milky drink and meia-de-seda recipe (alfg#1111)

    * add nevada as a milky drink

    * add meia-de-seda recipe

commit 4271d8c
Author: Ashwin Nair <58840757+Ashwin-exe@users.noreply.github.com>
Date:   Thu Oct 7 07:09:23 2021 +0530

    add new drink (alfg#1093)

    * add new drink

    * fixed the json file and image size

    * file name changed

commit c3fb3c5
Author: Jordann <jcolfej@users.noreply.github.com>
Date:   Thu Oct 7 03:37:03 2021 +0200

    Add Tom Yum recipe (alfg#1102)

    * Add Tom Um recipe

    * Fix Tom Yum recipe

commit 46907ec
Author: AlexG <xelaflash@gmail.com>
Date:   Mon Oct 4 10:13:27 2021 -0400

     Add recipe: Bajan rum punch (alfg#1106)

commit 6c6cf99
Author: Jordann <jcolfej@users.noreply.github.com>
Date:   Mon Oct 4 16:12:07 2021 +0200

    Add Watermelon Vodka recipe (alfg#1104)

    * Add Watermelon Vodka recipe

    * Fix Watermelon Vodka recipe

commit c4c15d4
Author: Jordann <jcolfej@users.noreply.github.com>
Date:   Mon Oct 4 16:11:59 2021 +0200

    Add Cranberry Tonic recipe (alfg#1103)

commit fbf15ec
Author: Jordann <jcolfej@users.noreply.github.com>
Date:   Mon Oct 4 16:11:35 2021 +0200

    Add Danish Summer recipe (alfg#1105)

commit 13b4f0e
Author: imgbot[bot] <31301654+imgbot[bot]@users.noreply.github.com>
Date:   Mon Oct 4 07:11:06 2021 -0700

    [ImgBot] Optimize images (alfg#1101)

    *Total -- 288.23kb -> 275.37kb (4.46%)

    /src/assets/recipes/chai-e-zanjafeel.jpg -- 29.66kb -> 27.98kb (5.66%)
    /src/assets/recipes/pumpkin-juice.jpg -- 128.42kb -> 121.42kb (5.46%)
    /src/assets/recipes/apple-cider-margarita.jpg -- 35.86kb -> 34.04kb (5.07%)
    /src/assets/recipes/tschunk.jpg -- 35.07kb -> 33.65kb (4.04%)
    /src/assets/recipes/peach-martini.jpg -- 26.63kb -> 25.94kb (2.6%)
    /src/assets/recipes/hanky-panky.jpg -- 32.59kb -> 32.34kb (0.78%)

    Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com>

    Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com>

commit 2341b0f
Author: Alfred Gutierrez <alfg@users.noreply.github.com>
Date:   Sun Oct 3 11:40:08 2021 -0700

    Update featured.json

commit c2f71e2
Author: Jan Holmberg <ask.jaho@gmail.com>
Date:   Sun Oct 3 20:23:55 2021 +0200

    Add recipe as a hacktober2021 contribution (alfg#1094)

commit f61a646
Author: Dave Borghuis <dave@daveborghuis.nl>
Date:   Sun Oct 3 20:23:16 2021 +0200

    Added Tschunk drink (alfg#1095)

commit aa886e0
Author: shingo.sasaki <shingo.sasaki.0529@gmail.com>
Date:   Mon Oct 4 03:16:40 2021 +0900

    Implement i18n using vue-i18n (alfg#1090)

    * setup vue-i18n

    * translate the top page

    * translate the featured page

    * translate the explore page

    * translate the search page

    * translate the favorites page

    * translate other words

    * translate other words

    * determine language from window object

    * enable silent warnings

    * transtate 'Copy URL'

    * remove unused npm script

    * Inject i18n into unit tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants