nuxt / website-v2

Nuxt 2 Documentation Website
https://v2.nuxt.com
Other
2.25k stars 1.19k forks source link

[Chinese] translate new guides #547

Open debs-obrien opened 4 years ago

debs-obrien commented 4 years ago

New guides section needs to be translated.

See the readMe for info on how to translate our site: https://github.com/nuxt/nuxtjs.org

Feel free to just take one page and submit a pr. make sure you also tick the box in the list below. Or take on the whole project and just create a draft pr and we will merge it when it is finished.

i18n configuration

๐Ÿ“ guides -> components glossary

๐Ÿ“ guides -> concepts

๐Ÿ“ guides -> configuration glossary

๐Ÿ“ guides -> directory structure

๐Ÿ“ guides -> features

๐Ÿ“ guides -> get-started

๐Ÿ“ guides -> internals glossary

thedb commented 3 years ago

https://github.com/nuxt/nuxtjs.org/pull/1104

I have completed the example part..

thedb commented 3 years ago

My next target:

๐Ÿ“ guides -> get-started

debs-obrien commented 3 years ago

great work. Once the majority of chapters have been translated we can add the 'zh' to the array in the slug for docs. Until then these pages won't be live and best to only put them live when we have a high percentage translated. keep up the great work @thedb

whwh1233 commented 3 years ago

gogogo,I will continue the Chinese translation work!

thedb commented 3 years ago

gogogo,I will continue the Chinese translation work!

Thank you for your help. But I have a project this week. I will talk to you about the current progress when I am free.

dandanXO commented 3 years ago

HI I want to translate traditional Chinese. Do I need new Folder ?

ๅ› ็‚บๅชๆœ‰็œ‹ๅˆฐ็ฐก้ซ”ไธญๆ–‡ ไธ็Ÿฅ้“็น้ซ”ไธญๆ–‡ ้œ€่ฆๅ‰ต็ซ‹ๆ–ฐ็š„่ณ‡ๆ–™ๅคพๅ—Ž๏ผŸ

@thedb @debs-obrien

davinma commented 2 years ago

Maybe we can add two more files to i18n folder, zh-hans.js for simple Chinese, and zh-hant.js for traditional Chinese. zh-ZH.js looks older than en-US.js now.

davinma commented 2 years ago

@dandanXO

You can copy the content/en folder folder, rename the content/en to content/tw. Copy the i18n/zh-ZH.js and rename to i18n/zh-TW.js. And, then modify nuxt.config.ts like this:

export default withDocus({
  // ...
  i18n: {
    langDir: 'i18n/',
    locales: [
      {
        code: 'en',
        iso: 'en-US',
        file: 'en-US.js',
        name: 'English'
      },
      {
        code: 'fr',
        iso: 'fr-FR',
        file: 'fr-FR.js',
        name: 'Franรงais'
      },
      {
        code: 'ja',
        iso: 'ja-JP',
        file: 'ja-JP.js',
        name: 'ๆ—ฅๆœฌ่ชž'
      },
      {
        code: 'pt',
        iso: 'pt-PT',
        file: 'pt-PT.js',
        name: 'Portuguรชs'
-     }
+     },
+     {
+        code: 'tw',
+        iso: 'zh-TW',
+        file: 'zh-TW.js',
+        name: '็น้ซ”ไธญๆ–‡'
      }
    ]
  },
  // ...
})

Finally, run yarn dev start the development server.