Merge pull request #1 from liyasthomas/i18n

I18n
This commit is contained in:
Edik
2019-11-28 20:31:10 +08:00
committed by GitHub
5 changed files with 29 additions and 8 deletions

View File

@@ -178,6 +178,25 @@ _Requests with Pre-Request Scripts are indicated in History entries_
- Copy Request Link <kbd>Ctrl</kbd> + <kbd>K</kbd>
- Reset Request <kbd>Ctrl</kbd> + <kbd>L</kbd>
🌎 **i18n**: Internationalization β.
- Add a new locale in `lang/`
- Ex: `lang/es-ES.js`
- Mention `code`, `name`, `iso` and `file` in `nuxt.config.js`
```
i18n: {
locales: [{
code: 'es',
name: 'Español',
iso: 'es-ES',
file: 'es-ES.js'
}]
}
```
_**All contributions are welcome to `i18n` [branch](https://github.com/liyasthomas/postwoman/tree/i18n) only!**_
**To find out more, please check out [Postwoman Wiki](https://github.com/liyasthomas/postwoman/wiki).**
## Demo 🚀 [![Website](https://img.shields.io/website?url=https%3A%2F%2Fpostwoman.io&logo=Postwoman)](https://postwoman.io)

3
lang/id-ID.js Normal file
View File

@@ -0,0 +1,3 @@
export default {
send: 'Kirim'
}

View File

@@ -314,6 +314,12 @@ export default {
name: '简体中文',
iso: 'zh-CN',
file: 'zh-CN.js'
},
{
code: 'id',
name: 'Bahasa Indonesia',
iso: 'id-ID',
file: 'id-ID.js'
}
],
defaultLocale: 'en',

View File

@@ -1488,7 +1488,7 @@ export default {
// We make our temporary headers object the source so
// that you can override the added headers if you
// specify them.
headers
// headers
);
Object.keys(headers).forEach(id => {

View File

@@ -1,7 +0,0 @@
describe('Visit home', () => {
it('Have a page title with "Postwoman"', () => {
cy.visit('/')
.get('title')
.should('contain','Postwoman')
})
})