Skip to content

Commit

Permalink
Merge pull request #51 from tracking-exposed/add-i18n
Browse files Browse the repository at this point in the history
Add i18n
  • Loading branch information
vecna authored Jun 12, 2017
2 parents 887cc82 + e77e8a1 commit 18ad24a
Show file tree
Hide file tree
Showing 10 changed files with 339 additions and 54 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
The format is based on [Keep a Changelog](http://keepachangelog.com/) and this
project adheres to [Semantic Versioning](http://semver.org/).

## [1.1.4] - 2017-06-12
### Added
- i18n support
- messages translated in PT\_br

## [1.1.3] - 2017-05-26
### Fixed
- Update selector for posts
Expand Down
16 changes: 16 additions & 0 deletions _locales/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Working with i18n

Check the [official docs](https://developer.chrome.com/extensions/i18n). This is important
if you are developing under Linux:

> to change the locale on Linux, first quit Google Chrome. Then, all in one line, set the LANGUAGE environment variable and launch Google Chrome. For example:
```
LANGUAGE=es ./chrome
```


# Accepted locales

Refer to the [locales support](https://developer.chrome.com/webstore/i18n?csw=1#localeTable) page
in the official Chrome documentation.
105 changes: 105 additions & 0 deletions _locales/en/messages.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
{
"extensionName": {
"message": "facebook.tracking.exposed",
"description": "Extension name"
},

"extensionDescription": {
"message": "Collaborative tool to support investigation of personalization algorithms.",
"description": "Extension description"
},

"onboardingTitle": {
"message": "Yay!! Welcome to facebook.tracking.exposed!"
},

"onboardingIntro": {
"message": "We need you to post your public key, copy and paste the following message as new **public post**. After a minute you can safely delete it."
},

"onboardingCopyPaste": {
"message": "Personalisation Algorithms are a collective issue, and can only be collectively addressed; today I am joining https://facebook.tracking.exposed and this technical message is necessary to link my account to the following key: $publickey$",
"placeholders": {
"publickey": {
"content": "$1"
}
}
},

"onboardingNote": {
"message": "We need you to post this key so we can associate it with yout contributions. After you post the key above, this post will disappear.\nIf something does not work, contact us on our [facebook page](https://www.facebook.com/personalizationalgorithm) or open an [issue on github](https://github.com/tracking-exposed/web-extension/issues)."
},

"onboardingReduceBox": {
"message": "Reduce box"
},

"onboardingReduced": {
"message": "facebook.tracking.exposed onboarding is not completed yet."
},

"onboardingReopen": {
"message": "Reopen box"
},

"popupTitle": {
"message": "Welcome to Facebook Tracking Exposed"
},

"popupSubTitle": {
"message": "Public Service Announcement"
},

"popupHello": {
"message": "Dear friend,\nthanks for supporting the [facebook.tracking.exposed](https://facebook.tracking.exposed/) initiative."
},

"popupIntro": {
"message": "We care a lot about your privacy and we want to be as transparent as possible, that's why:"
},

"popupHighlight": {
"message": "The extension only see and collects the **public posts**. You will know that public posts are being recorded by a notification highlighting them in your newsfeed."
},

"popupPrivacy": {
"message": "We have a [Privacy Statement](https://facebook.tracking.exposed/privacy-statement) that describes what data we collect, and why."
},

"popupFree": {
"message": "We release only [free, open source code](https://www.github.com/tracking-exposed/) everyone can audit."
},

"popupReality": {
"message": "**Access to [your data]($realitylink$)**, available to be downloaded or consulted (is a work in progress!). It contains what Facebook is showing you. In the 2017 will be improved with new visualizations and functionalities.",
"placeholders": {
"realitylink": {
"content": "$1"
}
}
},

"settingsTitle": {
"message": "Settings"
},

"settingsStudyGroup": {
"message": "I'm part of a study group"
},

"settingsTagId": {
"message": "Tag ID"
},

"settingsHideBanner": {
"message": "Hide the banner on top of the posts"
},

"settingsSaveAndReload": {
"message": "Save and reload"
},

"settingsCancel": {
"message": "Cancel"
}
}
105 changes: 105 additions & 0 deletions _locales/pt_BR/messages.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
{
"extensionName": {
"message": "facebook.tracking.exposed",
"description": "Extension name"
},

"extensionDescription": {
"message": "Ferramenta colaborativa para ajudar na investigação sobre personalização de algoritmos.",
"description": "Extension description"
},

"onboardingTitle": {
"message": "Eba! Bem-vinde ao facebook.tracking.exposed!"
},

"onboardingIntro": {
"message": "Nós precisamos que você publique sua chave pública e copie e cole a seguinte mensagem como uma nova **postagem pública**. Depois de um minuto, você pode deletar com segurança."
},

"onboardingCopyPaste": {
"message": "Algoritmos de personalização são um problema para a liberdade de informação, pois não sabemos como e porque algumas notícias aparecem na nossa timeline e outras não. Mas podemos mapear isso coletivamente! Hoje, estou me juntando ao https://facebook.tracking.exposed e esta mensagem com minha chave pública é necessária para vincular minha conta ao experimento: $publickey$",
"placeholders": {
"publickey": {
"content": "$1"
}
}
},

"onboardingNote": {
"message": "Se algo der errado, entre em contato através da [página do Facebook](https://www.facebook.com/personalizationalgorithm) ou relate o problema no [github](https://github.com/tracking-exposed/web-extension/issues)."
},

"onboardingReduceBox": {
"message": "Reduzir a caixa"
},

"onboardingReduced": {
"message": "Seu registro ainda não está finalizado"
},

"onboardingReopen": {
"message": "Reabrir a caixa"
},

"popupTitle": {
"message": "Bem-vinde ao Facebook Tracking Exposed"
},

"popupSubTitle": {
"message": "Anúncio de Serviço Público"
},

"popupHello": {
"message": "Olá,\nObrigada por apoiar a iniciativa [facebook.tracking.exposed](https://facebook.tracking.exposed/)."
},

"popupIntro": {
"message": "Nos preocupamos muito com a sua privacidade e queremos ser o mais transparente possível, por isso:"
},

"popupHighlight": {
"message": "Apenas temos acesso e coletamos informação dos seus **posts públicos**, aqueles que você escolhe compartilhar abertamente com qualquer um que entra no seu perfil, mesmo quem não é seu amigo. Você será lembrado que **posts públicos** estão sendo gravados por meio de uma notificação destacando-os na sua timeline."
},

"popupPrivacy": {
"message": "Nossa [Política de Privacidade](https://facebook.tracking.exposed/privacy-statement) descreve quais dados coletamos e por quê."
},

"popupFree": {
"message": "O [o código-fonte livre e aberto](https://www.github.com/tracking-exposed/) da extensão també está disponível para quem quiser auditar."
},

"popupReality": {
"message": "** [Seus dados coletados]($realitylink$)** também estão disponíveis para download ou consulta. Eles são o resultado do seu experimeto. Estamos trabalhando para melhorar a maneira como você visualiza e acessa esses dados.",
"placeholders": {
"realitylink": {
"content": "$1"
}
}
},

"settingsTitle": {
"message": "Settings"
},

"settingsStudyGroup": {
"message": "Eu sou parte de um grupo de estudos"
},

"settingsTagId": {
"message": "Tag ID"
},

"settingsHideBanner": {
"message": "Ocultar o banner em cima das postagens"
},

"settingsSaveAndReload": {
"message": "Salvar e recarregar"
},

"settingsCancel": {
"message": "Cancelar"
}
}
8 changes: 5 additions & 3 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
{
"manifest_version": 2,

"name": "facebook.tracking.exposed",
"description": "Collaborative tool to support investigation of personalization algorithms.",
"version": "1.1.3",
"name": "__MSG_extensionName__",
"description": "__MSG_extensionDescription__",
"version": "1.1.4",

"default_locale": "en",

"icons": {
"16": "fbtrex16.png",
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tracking-exposed-extension",
"version": "1.1.3",
"version": "1.1.4",
"description": "facebook.tracking.exposed → browser extension to investigate personalization algorithms",
"homepage": "https://github.com/tracking-exposed/facebook/",
"bugs": "https://github.com/tracking-exposed/facebook/issues",
Expand All @@ -12,10 +12,10 @@
},
"scripts": {
"lint": "eslint ./",
"build": "rimraf ./build && cross-env webpack && cp manifest.json icons/* ./build",
"build": "rimraf ./build && cross-env webpack && cp -r manifest.json icons/* _locales/ ./build/",
"start": "npm run build:watch:files",
"build:watch": "cross-env node dev-server.js",
"build:watch:files": "rimraf ./build && mkdir build && cp manifest.json icons/* popup.html ./build && cross-env webpack -w",
"build:watch:files": "rimraf ./build && mkdir build && cp -r manifest.json icons/* _locales/ popup.html ./build/ && cross-env webpack -w",
"build:dist": "./pack-extension.sh || true",
"clean": "rimraf ./build ./dist",
"test": "mocha --compilers js:babel-register --reporter spec",
Expand Down Expand Up @@ -74,6 +74,7 @@
"immutability-helper": "^2.1.1",
"jquery": "^3.1.0",
"lodash": "^4.17.4",
"marked": "^0.3.6",
"material-ui": "^0.16.7",
"react": "^15.3.0",
"react-dom": "^15.3.0",
Expand Down
42 changes: 12 additions & 30 deletions src/chrome/popup/components/infoBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,48 +2,30 @@ import React from 'react';

import { Card, CardHeader, CardTitle, CardText } from 'material-ui/Card';

import { T, t } from '../../../i18n';

const InfoBox = React.createClass({

render () {
const realitylink = "https://facebook.tracking.exposed/realitycheck/" + this.props.userId + "/data";
const realitylink = 'https://facebook.tracking.exposed/realitycheck/' + this.props.userId + '/data';

return (
<Card>
<CardHeader
avatar={chrome.extension.getURL('fbtrex48.png')}
title="Welcome to Facebook Tracking Exposed"
subtitle="Public Service Announcement"
title={t('popupTitle')}
subtitle={t('popupSubTitle')}
/>

<CardText>
<p>
Dear friend,<br />
thanks for supporting the <a href="https://facebook.tracking.exposed/" target="_blank">
facebook.tracking.exposed</a> initiative.
</p>

<p>
We care a lot about your privacy and we want to be as
transparent as possible, that's why:
</p>
<T msg="popupHello" />
<T msg="popupIntro" />

<ul>
<li>
Your <em>Facebook newsfeed</em> highlights
the <strong>public posts</strong> we collect.
</li>
<li>
We have a <a href="https://facebook.tracking.exposed/privacy-statement" target="_blank">
Privacy Statement</a> that describes what data
we collect, and why.
</li>
<li>
We release only <a href="https://www.github.com/tracking-exposed/" target="_blank">
free, open source code</a> everyone can audit.
</li>
<li>
<b>Access to <a href={realitylink} target="_blank">
your data</a></b>, available to be downloaded or consulted (is a work in progress!). It contains what Facebook is showing you. In the 2017 will be improved with new visualizations and functionalities.
</li>
<T tag='li' msg="popupHighlight" />
<T tag='li' msg="popupPrivacy" />
<T tag='li' msg="popupFree" />
<T tag='li' msg="popupReality" args={realitylink} />
</ul>
</CardText>
</Card>
Expand Down
Loading

0 comments on commit 18ad24a

Please sign in to comment.