Commit d7156be9 authored by Cognata's avatar Cognata

Merge branch 'Transifex_README_update_and_config' into 'master'

Transifex README update and config

See merge request riseuplabs/crabgrass!131
parents ddacdb57 4df9f31d
[main]
host = https://www.transifex.com
[crabgrass.riseup]
file_filter = extensions/locales/riseup/<lang>.yml
minimum_perc = 0
source_file = extensions/locales/riseup/en.yml
source_lang = en
type = YML
[crabgrass.develop]
file_filter = config/locales/<lang>.yml
minimum_perc = 0
source_file = config/en.yml
source_lang = en
type = YML
TRANSIFEX
I18n rake tasks
------------------------
To handle translations, we are using a system called Transifex. On transifex, the crabgrass home page is here:
https://www.transifex.net/projects/p/crabgrass/
To upload a new English source file using the web interface, go to 'Resources' -> 'develop' -> 'Update source file'
In the screen to edit the resource, you can upload a new source file.
We will upload just the en.yml as a resource, which is generated from the different English files.
The en.yml file should not be edited directly, as then changes will be lost when somebody generates it again.
There is transifex documentation at https://docs.transifex.com/
and the Transifix API:
http://help.transifex.net/features/api/api-v2.1.html
There is a rake task to pull translations for the enabled languages. This can be run with:
rake cg:i18n:download
For this task to work, you must set the transifex password in the appropriate config/crabgrass/crabgrass.{environment}.yml file.
Some more specific documentation:
To get out translated files, we can download them from the website.
curl -L --user {user}:{pass} -X GET https://www.transifex.net/api/2/project/crabgrass/resource/master/translation/{language-to-get}/?file
to get stats:
curl -L --user {user}:{pass} -X GET https://www.transifex.net/api/2/project/crabgrass/resource/master/stats/
It would be nice to upload new source files, but I haven't gotten that to work right. I was hoping something like this would work, but it does not:
curl -L --user {user}:{pass} -X PUT -H "Content-Type: multipart/form-data" --upload-file "config/locales/en.yml" https://www.transifex.net/api/2/project/crabgrass/resource/master/content
We can also explore using the transifix client:
http://help.transifex.net/features/client/index.html
KEY CHANGES
-----------------
There are several rake tasks, see in lib/tasks/i18n.rb
user_profile_description_may_see -> user_profile_description_may_view
To get an overview run:
$ rake cg:i18n:bundle
$ rake cg:i18n:report
contact_request_message_label -> friend_request_message_label
contact_request_sent -> friend_request_sent
remove_contact_confirmation -> friend_remove_confirmation
In order to download translations, you need a config/transifex.netrc file.
For example:
machine www.transifex.com login crabgrass password xxxxxxxxxxxxxxxxx
approve_contact_info -> destroy
approve_contact_request -> destroy
add_contact_info -> destroy
contact_removed -> destroy
not_contact_of -> destroy
already_contacts_info -> destroy
ADDITIONS
TRANSIFEX
------------------------
To handle translations, we are using a system called Transifex. On transifex,
the crabgrass home page is here:
https://www.transifex.com/riseuplabs/crabgrass.
Translators see the value from the english source file.
added in crabgrass, not translated:
optional: "Optional"
date_this_year: "This Year"
There is more transifex documentation at https://docs.transifex.com/.
updated_by: "Updated by"
person: "Person"
recipient: "Recipient"
messages_with: "Conversation with %{other_user}"
no_things_found: "No %{things} found."
thing_destroyed: "%{thing} destroyed"
created_by_entity: "Created by %{entity}"
approved_by_entity: "Approved by %{entity}"
rejected_by_entity: "Rejected by %{entity}"
USING THE TRANSIFEX CLIENT
------------------------
request: "Request"
The transifex client allows you to pull translations and update source files
from your console \o/.
https://docs.transifex.com/client/introduction
request_pending: "%{thing} is pending approval"
Installing the client:
https://docs.transifex.com/client/installing-the-client
request_to_friend: "Friend Request"
request_to_join_our_network: "Network Join Invite"
request_to_join_us: "Join Invite"
request_to_join_us_via_email: "Join Invite"
request_to_join_you: "Join Request"
request_to_join_your_network: "Network Join Request"
request_to_destroy_our_group: "Destroy Group Vote"
request_to_remove_user: "Remove Member Vote"
request_to_remove_user_description: "%{user} has proposed to remove %{member} from %{group_type} %{group}"
Configuring the client:
https://docs.transifex.com/client/client-configuration
request_to_friend_short: "%{user} friends %{other_user}?"
request_to_join_our_network_short: "%{network} joins %{group}?"
request_to_join_us_short: "%{user} joins %{group}?"
request_to_join_us_via_email_short: "%{email} joins %{group}?"
request_to_join_you_short: "%{user} joins %{group}?"
request_to_join_your_network_short: "%{group} joins %{network}?"
request_to_destroy_our_group_short: "Destroy %{group}?"
request_to_remove_user_short: "Expell %{member}?"
Command list:
--------------
$ tx status
# search filters
created_by_user: "Created by %{user}"
created_by_dotdotdot: "Created by..."
search_most_edits: "Most Edits"
search_most_views: "Most Views"
search_most_stars: "Most Stars"
Updating source files to transifex:
$ tx push --source
# page searchin sections, maybe:
my_pages: "My Pages"
properties: "Properties"
popular_pages: "Popular Pages"
advanced: "Advanced"
access: "Access"
type: "Type"
Downloading and overwriting local translation files:
$ tx pull -a
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment