diff --git a/.tx/config b/.tx/config new file mode 100644 index 000000000..47f786313 --- /dev/null +++ b/.tx/config @@ -0,0 +1,14 @@ +[main] +host = https://www.transifex.com + +#[ooniprobe.stringsxml] +#file_filter = res/values-/strings.xml +#source_file = res/values/strings.xml +#source_lang = en +#type = ANDROID + +[ooniprobe.description] +file_filter = description/.xlf +source_file = description/source.xlf +source_lang = en +type = XLIFF diff --git a/README.md b/README.md index 5137109ad..36cff1925 100644 --- a/README.md +++ b/README.md @@ -63,3 +63,49 @@ If you wish to test the apk inside of an emulator this can be done with ``` The app should then be installed inside of the emulator `Nexus_5_API_23_marshmallow_6.0`. + +## Managing translations + +To manage translations ensure you have installed the [transifex command line +tools](https://docs.transifex.com/client/installing-the-client). + +### Pushing source text + +To push the source of the translation run: + +``` +tx push -s +``` + +### Pulling translations + +To pull in translations run: + +``` +tx pull +``` + +or + +``` +tx pull -l [lang_code] +``` + +to pull only a specific language + + +### Generating descriptions for market + +To generate translated descriptions for the markets run: + +``` +python scripts/gen-descriptions.py [lang_code] +``` + +Where `lang_code` is the language code for the description you want to +generate. + +This will print to standard output the translated text that you can then copy +and paste into the market descriptions. + +If a string is not translated it will print the source for the text. diff --git a/description/source.xlf b/description/source.xlf new file mode 100644 index 000000000..51d5d6107 --- /dev/null +++ b/description/source.xlf @@ -0,0 +1,100 @@ + + + +
+ Google places strick character limits on the various text fields in Google Play. The title is 30 characters, the short description is 80 characters, and the rest of the strings, which all go together in the description, are limited to 4000 characters. +
+ + + ooniprobe + This is limited by Google to 30 characters + + + Measure Internet Censorship, Speed & Performance + This is limited by Google to 80 characters + + + Interested in collecting evidence of Internet censorship? Curious about the speed and performance of the network that you are using? + + + + By running the tests in this app, you will examine the following: + + + • Blocking of websites + + + • Presence of systems that could be responsible for censorship and/or surveillance + + + • Speed and performance of your network + + + These tests have been developed by the Open Observatory of Network Interference (OONI), a free software project (under The Tor Project) that aims to uncover Internet censorship around the world. + + + Since 2012, OONI has collected millions of network measurements across more than 190 countries, shedding light on multiple cases of network interference. By running these tests, you will help increase transparency around Internet censorship and network interference around the world. + + + Collecting evidence of internet censorship + + + OONI's web connectivity test is designed to examine whether websites are blocked and if so, how. This test, in particular, attempts to determine whether access to sites is blocked through DNS tampering, TCP/IP blocking, or by a transparent HTTP proxy. By knowing how access to sites is interfered with, you can more easily evaluate how to circumvent that specific type of censorship. As OONI is committed to transparency through the publication of all network measurement data, you can use it as evidence of any censorship events that you come across. + + + Detecting systems responsible for censorship and surveillance + + + Various types of proxy technologies are used in networks for implementing censorship, surveillance, and traffic manipulation. OONI's HTTP invalid request line test is designed to uncover the presence of such systems within tested networks. However, it's important to point out that not all systems that you might find are necessarily responsible for censorship and/or surveillance! Many proxy technologies, for example, are used in networks for caching purposes. + + + Measuring the speed and performance of your network + + + Sometimes the network that we are using doesn't work as well as we'd like it to. OONI's implementation of the Network Diagnostic Test (NDT) attempts to measure the speed of your network by connecting to mLab servers near you and by subsequently uploading and downloading random data. In doing so, NDT collects low level TCP/IP information that can help characterize the speed and performance of your network. Such information can also be useful in examining cases of throttling. + + + Open data + + + OONI publishes all network measurement data that it collects and processes because open data allows third parties to conduct independent studies, to verify OONI findings and/or to answer other research questions. Such data also helps increase transparency around Internet censorship and various forms of network interference. All data is published on OONI Explorer: https://explorer.ooni.torproject.org/ + + + Free software + + + All OONI tests, as well as its NDT implementation, are based on free and open source software. You can find the source code through the following link: https://github.com/thetorproject/ooniprobe-ios + + + + Follow us on Twitter: https://twitter.com/OpenObservatory + + + + Please note: Running ooniprobe might be against the terms of service of your ISP or legally questionable in your country. By running ooniprobe you will connect to web services which may be banned, and use web censorship circumvention methods such as Tor. The OONI project will publish data submitted by probes, possibly including your IP address or other identifying information. In addition, your use of ooniprobe will be clear to anyone who has access to your computer, and to anyone who can monitor your Internet connection (such as your employer, ISP or government). + + + + Detect internet censorship and test your network's speed and performance + + + Undercover evidence of internet censorship and lear how to circumvent it + + + Run a sophisticated network speed and diagnostics test + + + Easily discover which websites are blocked on your network + + + Testing your network is fun with a friendly octopus! + + + The Open Observatory og Network Interference is a global observation network for detecting censorship, surveillance and treffic manipulation on the internet. + + + network,speedtest,measurement,net,wifi,networking,scan,bandwidth,bench,dns,mobile,ooni,research,tool + + +
+
diff --git a/scripts/gen-descriptions.py b/scripts/gen-descriptions.py new file mode 100644 index 000000000..972f751e0 --- /dev/null +++ b/scripts/gen-descriptions.py @@ -0,0 +1,115 @@ +import os +import sys +import xml.dom.minidom as md + +title_tmpl = u"{title}" +short_description_tmpl = u"{shortdescription}" + +full_description_tmpl = u""" +{intro} +{intro2} +{intro-bullet-1} +{intro-bullet-2} +{intro-bullet-3} + +{intro3} +{intro4} + +{evidence-title} +{evidence-description} + +{systems-title} +{systems-description} + +{speed-title} +{speed-description} + +{opendata-title} +{opendata-description} + +{freesoftware-title} +{freesoftware-description} + + +{social-links} + + +{disclaimer} +""" +screenshots_tmpl = u""" +# Screnshot 1 +{screenshot1} + +# Screnshot 2 +{screenshot2} + +# Screnshot 3 +{screenshot3} + +# Screnshot 4 +{screenshot4} + +# Screnshot 5 +{screenshot5} + +# Feature Graphic +{feature-graphic} +""" +keywords_tmpl = u"{keywords}" + +def get_ids(lang_code='source'): + ids = {} + dom = md.parse('description/{lang_code}.xlf'.format(lang_code=lang_code)) + units = dom.getElementsByTagName('trans-unit') + for unit in units: + unit_id = unit.getAttribute('id') + target = unit.getElementsByTagName('target') + if len(target) == 0: + target = unit.getElementsByTagName('source') + assert len(target) == 1 + target = target[0] + assert len(target.childNodes) == 1 + value = target.childNodes[0].nodeValue + if unit_id in ids and ids[unit_id] != value: + raise Exception("Duplicate ID") + ids[unit_id] = value + return ids + +def print_frmt(name, value): + title = "%s (%d chars)" % (name, len(value)) + print(title) + print("-"*len(title)) + print(value) + print("\n\n") + +def print_tmpls(lang_code='source'): + ids = get_ids(lang_code) + + title = title_tmpl.format(**ids) + print_frmt("Title", title) + + short_description = short_description_tmpl.format(**ids) + print_frmt("Short description", short_description) + + full_description = full_description_tmpl.format(**ids) + print_frmt("Full description", full_description) + + screenshots = screenshots_tmpl.format(**ids) + print_frmt("Screenshots", screenshots) + + keywords = keywords_tmpl.format(**ids) + print_frmt("Keywords", keywords) + +if __name__ == "__main__": + if len(sys.argv) != 2: + print("Usage: %s [lang_code]" % sys.argv[0]) + sys.exit(1) + if not os.path.exists(os.path.join("description/source.xlf")): + print("ERROR") + print("This script must be run from the root of the repository") + sys.exit(1) + + target = sys.argv[1] + if target == 'en': + target = 'source' + print_tmpls(target)