Skip to content

Commit

Permalink
fix ftp pages, new version, improve build
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrei Cristian Petcu committed Aug 21, 2019
1 parent 860d2e2 commit 24ae1c7
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 7 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Google Translate This
This WebExtension translates the current page with Google Translate. It does so on demand so it does not change the page unless the user selected this.

[Desktop install](https://github.com/andreicristianpetcu/google_translate_this/releases/download/v2.2.10/google_translate_this_page-2.2.10-fx.xpi)
# [Desktop install](https://github.com/andreicristianpetcu/google_translate_this/releases/download/v2.2.11/google_translate_this_page-NEW_VERSION-fx.xpi)

[Android install](https://github.com/andreicristianpetcu/google_translate_this/releases/download/v2.2.10/google_translate_this_page-2.2.10-an.xpi)
# [Android install](https://github.com/andreicristianpetcu/google_translate_this/releases/download/v2.2.11/google_translate_this_page-NEW_VERSION-an.xpi)

![Alt text](https://raw.githubusercontent.com/andreicristianpetcu/google_translate_this/master/images/google_translate_this_print_screen.png)

Expand Down
9 changes: 6 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ version=$1

sed -i -E "s/\"version\":(.*)/\"version\": \"$version\",/" manifest.json
sed -i -E "s/\"version\":(.*)/\"version\": \"$version\",/" manifest_android.json
cat rm_template.md > README.md
sed -i -E "s/NEW_VERSION/$version/" README.md

echo "
{
\"version\": \"$version\",
Expand All @@ -18,11 +21,11 @@ cat manifest.json | grep version
zip tr_desktop.zip manifest.json scripts/* images/* _locales/**/*

#build android
cp manifest.json manifest_desktop.json
cp manifest_android.json manifest.json
cat manifest.json > manifest_desktop.json
cat manifest_android.json > manifest.json
cat manifest.json | grep version
zip tr_android.zip manifest.json scripts/* images/* _locales/**/*
cp manifest_desktop.json manifest.json
cat manifest_desktop.json > manifest.json
rm -rf manifest_desktop.json

xdg-open https://addons.mozilla.org/en-US/developers/addon/60f12ab296874cd39fef/versions
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "__MSG_appName__",
"version": "2.2.10",
"version": "2.2.11",
"homepage_url": "https://github.com/andreicristianpetcu/google_translate_this",
"manifest_version": 2,
"description": "__MSG_appDescription__",
Expand Down
2 changes: 1 addition & 1 deletion manifest_android.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "__MSG_appName__",
"version": "2.2.10",
"version": "2.2.11",
"homepage_url": "https://github.com/andreicristianpetcu/google_translate_this",
"manifest_version": 2,
"description": "__MSG_appDescription__",
Expand Down
20 changes: 20 additions & 0 deletions rm_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Google Translate This
This WebExtension translates the current page with Google Translate. It does so on demand so it does not change the page unless the user selected this.

# [Desktop install](https://github.com/andreicristianpetcu/google_translate_this/releases/download/vNEW_VERSION/google_translate_this_page-NEW_VERSION-fx.xpi)

# [Android install](https://github.com/andreicristianpetcu/google_translate_this/releases/download/vNEW_VERSION/google_translate_this_page-NEW_VERSION-an.xpi)

![Alt text](https://raw.githubusercontent.com/andreicristianpetcu/google_translate_this/master/images/google_translate_this_print_screen.png)

# Why is this not on AMO?
This extension [executes remote code from Google in your current page](https://github.com/andreicristianpetcu/google_translate_this/blob/81b7f16858650f127ec3e54250a7089ca9b03219/scripts/inject_google_translate_content.js#L17) and this is against [AMO rules](https://developer.mozilla.org/en-US/Add-ons/AMO/Policy/Reviews). If you use Chrome it does the same thing.
I hope I can make it get into AMO soon but it depends on a lot of things.

# Privacy considerations
This extension by default does [not transmit any info to any site](https://github.com/andreicristianpetcu/google_translate_this/blob/d3f1344e1ed0382a34e385fdfa2584b88eb2ee18/scripts/background.js#L38-L47). ONCE YOU CLICK TRANSLATE CONSIDER THE PAGE SENT TO GOOGLE! Unfortunately this is how Google Translate works. This is the best I could do with the APIs that are avilable. I tried to isolate the page somehow but it is really difficult. Not only this but the extension grabs code from google translate and injects it in your current page. This only happens after you click translate, if you don't interact with the extension, nothing gets send.

This extension was designed for people leaving Chrome for Firefox. Some really need this feature and don't mind the downsides. If you want a more privacy frinedly extension, check out [AMO](https://addons.mozilla.org/firefox/search/?q=translate&sort=users&type=extension) it has quite a few of them. Unfortunately they are not as user friendly as this one.

# Planned features
I hope it will work in Android soon since I am using WebExtension APIs and they work in Android also.
4 changes: 4 additions & 0 deletions updates.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@
{
"version": "2.2.10",
"update_link": "https://github.com/andreicristianpetcu/google_translate_this/releases/download/v2.2.10/google_translate_this_page-2.2.10-fx.xpi"
},
{
"version": "2.2.11",
"update_link": "https://github.com/andreicristianpetcu/google_translate_this/releases/download/v2.2.11/google_translate_this_page-2.2.11-fx.xpi"
}
]
}
Expand Down
4 changes: 4 additions & 0 deletions updates_android.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
{
"version": "2.2.10",
"update_link": "https://github.com/andreicristianpetcu/google_translate_this/releases/download/v2.2.10/google_translate_this_page-2.2.10-an.xpi"
},
{
"version": "2.2.11",
"update_link": "https://github.com/andreicristianpetcu/google_translate_this/releases/download/v2.2.11/google_translate_this_page-2.2.11-an.xpi"
}
]
}
Expand Down

0 comments on commit 24ae1c7

Please sign in to comment.