Skip to content

Commit

Permalink
feat(translation): add brazilian portuguese translations (#284)
Browse files Browse the repository at this point in the history
* feat(i18n): Add brazilian portuguese translations (#280)

* Fixing prettier changes on turkish translation

* Renaming files to ptBr for clarity

* Updating branch and adding hyphen in language code
  • Loading branch information
arthurdenner authored and Houssein Djirdeh committed Sep 10, 2017
1 parent e42c83c commit a5e4641
Show file tree
Hide file tree
Showing 10 changed files with 358 additions and 5 deletions.
6 changes: 6 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,12 @@
]
},
{
"login": "arthurdenner",
"name": "Arthur Denner",
"avatar_url": "https://avatars0.githubusercontent.com/u/13774309?v=4",
"profile": "https://github.com/arthurdenner",
"contributions": []
},
"login": "FlorianTaut",
"name": "Florian Taut",
"avatar_url": "https://avatars1.githubusercontent.com/u/18403881?v=4",
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,5 @@ Please take a look at the [contributing guidelines](./CONTRIBUTING.md) for a det
| [<img src="https://avatars3.githubusercontent.com/u/3055294?v=3" width="100px;"/><br /><sub>Patrick Wang</sub>](https://patw.me)<br />[💻](https://github.com/gitpoint/git-point/commits?author=patw0929 "Code") [🐛](https://github.com/gitpoint/git-point/issues?q=author%3Apatw0929 "Bug reports") | [<img src="https://avatars5.githubusercontent.com/u/627794?v=4" width="100px;"/><br /><sub>Mike Kavouras</sub>](https://github.com/mikekavouras)<br />[💻](https://github.com/gitpoint/git-point/commits?author=mikekavouras "Code") [🐛](https://github.com/gitpoint/git-point/issues?q=author%3Amikekavouras "Bug reports") | [<img src="https://avatars4.githubusercontent.com/u/4848554?v=4" width="100px;"/><br /><sub>Peter Lazar</sub>](https://github.com/peterlazar1993)<br />[💻](https://github.com/gitpoint/git-point/commits?author=peterlazar1993 "Code") | [<img src="https://avatars6.githubusercontent.com/u/5106887?v=4" width="100px;"/><br /><sub>June Domingo</sub>](https://github.com/junedomingo)<br />[💻](https://github.com/gitpoint/git-point/commits?author=junedomingo "Code") [🐛](https://github.com/gitpoint/git-point/issues?q=author%3Ajunedomingo "Bug reports") | [<img src="https://avatars7.githubusercontent.com/u/9287184?v=4" width="100px;"/><br /><sub>Antoine Boisadam</sub>](https://github.com/Antoine38660)<br />[💻](https://github.com/gitpoint/git-point/commits?author=Antoine38660 "Code") [🐛](https://github.com/gitpoint/git-point/issues?q=author%3AAntoine38660 "Bug reports") | [<img src="https://avatars6.githubusercontent.com/u/13142418?v=4" width="100px;"/><br /><sub>Wang Shidong</sub>](https://wsdjeg.github.io)<br />[💻](https://github.com/gitpoint/git-point/commits?author=wsdjeg "Code") | [<img src="https://avatars4.githubusercontent.com/u/2190589?v=4" width="100px;"/><br /><sub>Swapnil Joshi</sub>](http://swapnilmj.users.sourceforge.net/)<br />[💻](https://github.com/gitpoint/git-point/commits?author=swapnilmj "Code") |
| [<img src="https://avatars5.githubusercontent.com/u/408959?v=4" width="100px;"/><br /><sub>Rolf Koenders</sub>](https://github.com/RolfKoenders)<br />[💻](https://github.com/gitpoint/git-point/commits?author=RolfKoenders "Code") [🐛](https://github.com/gitpoint/git-point/issues?q=author%3ARolfKoenders "Bug reports") | [<img src="https://avatars1.githubusercontent.com/u/10191084?v=4" width="100px;"/><br /><sub>Andrew Dassonville</sub>](https://andrewda.me)<br />[💻](https://github.com/gitpoint/git-point/commits?author=andrewda "Code") [💬](#question-andrewda "Answering Questions") [🐛](https://github.com/gitpoint/git-point/issues?q=author%3Aandrewda "Bug reports") [👀](#review-andrewda "Reviewed Pull Requests") | [<img src="https://avatars0.githubusercontent.com/u/2076088?v=4" width="100px;"/><br /><sub>Anton</sub>](https://medium.com/@antondomashnev)<br />[💻](https://github.com/gitpoint/git-point/commits?author=Antondomashnev "Code") | [<img src="https://avatars0.githubusercontent.com/u/14795799?v=4" width="100px;"/><br /><sub>Xuezheng Ma</sub>](https://github.com/xuezhma)<br />[💻](https://github.com/gitpoint/git-point/commits?author=xuezhma "Code") | [<img src="https://avatars0.githubusercontent.com/u/8962228?v=4" width="100px;"/><br /><sub>Sammy Israwi</sub>](https://github.com/SammyIsra)<br />[💻](https://github.com/gitpoint/git-point/commits?author=SammyIsra "Code") [🐛](https://github.com/gitpoint/git-point/issues?q=author%3ASammyIsra "Bug reports") | [<img src="https://avatars1.githubusercontent.com/u/8122587?v=4" width="100px;"/><br /><sub>Chao Ren</sub>](https://github.com/RogerAbyss)<br />[🐛](https://github.com/gitpoint/git-point/issues?q=author%3ARogerAbyss "Bug reports") [💻](https://github.com/gitpoint/git-point/commits?author=RogerAbyss "Code") | [<img src="https://avatars0.githubusercontent.com/u/11228182?v=4" width="100px;"/><br /><sub>Harish Toshniwal</sub>](https://introwit.in)<br />[📖](https://github.com/gitpoint/git-point/commits?author=introwit "Documentation") |
| [<img src="https://avatars2.githubusercontent.com/u/774577?v=4" width="100px;"/><br /><sub>Ferran Negre</sub>](http://github.com/ferrannp)<br />[💻](https://github.com/gitpoint/git-point/commits?author=ferrannp "Code") | [<img src="https://avatars2.githubusercontent.com/u/29695071?v=4" width="100px;"/><br /><sub>Ganesh Cauda Salim</sub>](https://github.com/caudaganesh)<br />[💻](https://github.com/gitpoint/git-point/commits?author=caudaganesh "Code") | [<img src="https://avatars0.githubusercontent.com/u/4316908?v=4" width="100px;"/><br /><sub>Wanda Ichsanul Isra</sub>](https://www.linkedin.com/in/wlisrausr)<br />[💻](https://github.com/gitpoint/git-point/commits?author=wlisrausr "Code") | [<img src="https://avatars0.githubusercontent.com/u/25394678?v=4" width="100px;"/><br /><sub>Cameron Samuels</sub>](http://cameronsamuels.com)<br />[📖](https://github.com/gitpoint/git-point/commits?author=CameronSamuels "Documentation") | [<img src="https://avatars2.githubusercontent.com/u/304450?v=4" width="100px;"/><br /><sub>Mehdi Achour</sub>](https://machour.idk.tn/)<br />[🐛](https://github.com/gitpoint/git-point/issues?q=author%3Amachour "Bug reports") [💻](https://github.com/gitpoint/git-point/commits?author=machour "Code") | [<img src="https://avatars2.githubusercontent.com/u/5353857?v=4" width="100px;"/><br /><sub>Reyhan Sofian</sub>](https://www.reyhan.tech/)<br />[💻](https://github.com/gitpoint/git-point/commits?author=reyhansofian "Code") | [<img src="https://avatars1.githubusercontent.com/u/11606323?v=4" width="100px;"/><br /><sub>adrianhartanto0</sub>](https://github.com/adrianhartanto0)<br />[💻](https://github.com/gitpoint/git-point/commits?author=adrianhartanto0 "Code") |
| [<img src="https://avatars2.githubusercontent.com/u/3624869?v=4" width="100px;"/><br /><sub>Blake Y. Gong</sub>](https://github.com/blakegong)<br />[💻](https://github.com/gitpoint/git-point/commits?author=blakegong "Code") | [<img src="https://avatars3.githubusercontent.com/u/1736154?v=4" width="100px;"/><br /><sub>Xianming Zhong</sub>](https://github.com/chinesedfan)<br />[💻](https://github.com/gitpoint/git-point/commits?author=chinesedfan "Code") | [<img src="https://avatars1.githubusercontent.com/u/18403881?v=4" width="100px;"/><br /><sub>Florian Taut</sub>](https://taut-fl.de)<br />[💻](https://github.com/gitpoint/git-point/commits?author=FlorianTaut "Code") | [<img src="https://avatars0.githubusercontent.com/u/15075759?v=4" width="100px;"/><br /><sub>Avare Kodcu</sub>](http://www.avarekodcu.com/iletisim)<br />[💻](https://github.com/gitpoint/git-point/commits?author=abdurrahmanekr "Code") | [<img src="https://avatars0.githubusercontent.com/u/23240518?v=4" width="100px;"/><br /><sub>Anas Khan</sub>](http://anask.xyz)<br />[💻](https://github.com/gitpoint/git-point/commits?author=anaskhan96 "Code") |
| [<img src="https://avatars2.githubusercontent.com/u/3624869?v=4" width="100px;"/><br /><sub>Blake Y. Gong</sub>](https://github.com/blakegong)<br />[💻](https://github.com/gitpoint/git-point/commits?author=blakegong "Code") | [<img src="https://avatars3.githubusercontent.com/u/1736154?v=4" width="100px;"/><br /><sub>Xianming Zhong</sub>](https://github.com/chinesedfan)<br />[💻](https://github.com/gitpoint/git-point/commits?author=chinesedfan "Code") | [<img src="https://avatars1.githubusercontent.com/u/18403881?v=4" width="100px;"/><br /><sub>Florian Taut</sub>](https://taut-fl.de)<br />[💻](https://github.com/gitpoint/git-point/commits?author=FlorianTaut "Code") | [<img src="https://avatars0.githubusercontent.com/u/13774309?v=4" width="100px;"/><br /><sub>Arthur Denner</sub>](https://github.com/arthurdenner)<br /> | [<img src="https://avatars0.githubusercontent.com/u/15075759?v=4" width="100px;"/><br /><sub>Avare Kodcu</sub>](http://www.avarekodcu.com/iletisim)<br />[💻](https://github.com/gitpoint/git-point/commits?author=abdurrahmanekr "Code") | [<img src="https://avatars0.githubusercontent.com/u/23240518?v=4" width="100px;"/><br /><sub>Anas Khan</sub>](http://anask.xyz)<br />[💻](https://github.com/gitpoint/git-point/commits?author=anaskhan96 "Code") |
<!-- ALL-CONTRIBUTORS-LIST:END -->
4 changes: 4 additions & 0 deletions src/auth/screens/language-settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,8 @@ export default [
code: 'tr',
name: 'Türkçe',
},
{
code: 'pt-br',
name: 'Português do Brasil',
},
];
4 changes: 3 additions & 1 deletion src/components/repository-profile.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,9 @@ export const RepositoryProfile = ({
? abbreviateNumber(repository.watchers_count)
: ' '}
</Text>
<Text style={styles.unitText}>Watchers</Text>
<Text style={styles.unitText}>
{translate('repository.main.watchers', language)}
</Text>
{subscribed &&
<Text style={[styles.unitStatus, styles.badge]}>
{translate('repository.main.watching', language)}
Expand Down
3 changes: 2 additions & 1 deletion src/locale/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { AsyncStorage } from 'react-native';
import I18n from 'react-native-i18n';
import { en, fr, nl, tr } from './languages';
import { en, fr, nl, ptBr, tr } from './languages';

I18n.fallbacks = true;

Expand All @@ -9,6 +9,7 @@ I18n.translations = {
fr,
nl,
tr,
'pt-br': ptBr,
};

export default I18n;
Expand Down
3 changes: 3 additions & 0 deletions src/locale/languages/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ export const en = {
searchMessage: 'Search for any {{type}}',
repository: 'repository',
user: 'user',
noUsersFound: 'No users found :(',
noRepositoriesFound: 'No repositories found :(',
},
},
user: {
Expand Down Expand Up @@ -193,6 +195,7 @@ export const en = {
forkedFromMessage: 'forked from',
starred: 'Starred',
watching: 'Watching',
watchers: 'Watchers',
},
codeList: {
title: 'Code',
Expand Down
1 change: 1 addition & 0 deletions src/locale/languages/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export * from './en.js';
export * from './fr.js';
export * from './nl.js';
export * from './pt-br.js';
export * from './tr.js';
Loading

0 comments on commit a5e4641

Please sign in to comment.