Closed dessalines closed 8 years ago
Brainstorming on coming up with a good way to do this.
I think I'm going to have a json file that contains all the strings in the html. Something like strings.json
. Where we can have different strings.json files, like strings_es.json
and strings_en.json
Then I'll generate the different html files, like the english and spanish version using a mustache template.
Then I'll run a javascript command to detect the browser's native language, and if its spanish, I'll automatically redirect you to the es.torrenttunes.ml version.
That seems great! Tell me when you have the html(s).
Here's the strings.json
file, I think I've got everything. I suggest copying and pasting this into here:
http://jsoneditoronline.org/ , it makes editing easier.
Only translate the right side, IE only change "home":"Home"
{
"strings": {
"home": "Home",
"home_page": "Home Page",
"lyrics": "Lyrics",
"picture": "Picture",
"browse": "Browse",
"play_queue": "Play Queue",
"share": "Share",
"playlists": "PlayLists",
"search_empty": "Search for Artists, Albums, or Songs",
"donate_bitcoin": "Donate Bitcoin",
"songs": "songs",
"top_songs": "Top Songs",
"trending_songs": "Trending Songs",
"track": "Track",
"artist": "Artist",
"artists": "Artists",
"related_artists": "Related Artists",
"time": "Time",
"album": "Album",
"albums": "Albums",
"top_albums": "Top Albums",
"trending_albums": "Trending Albums",
"play_album": "Play Album",
"plays": "Plays",
"compilations": "Compilations",
"tags": "Tags",
"seeders": "seeders",
"name": "Name",
"create_new_playlist": "Create New Playlist",
"playlist_empty": "My Playlist",
"about": "About",
"contact": "Contact",
"support": "Support",
"play_now": "Play now",
"play_next": "Play next",
"play_last": "Play last",
"create_station": "Create Station",
"add_to_playlist": "Add to Playlist",
"decentralized": "Decentralized",
"back_to_top": "Back to top",
"decentralized_section_html": " Every song is a <i>.torrent</i> file, tagged with <a class=\"text-normal\" href=\"http://musicbrainz.org/\" target=\"_blank\">MusicBrainz</a>, and shared on open and public <a href=\"https://en.wikipedia.org/wiki/BitTorrent\" class=\"text-normal\" target=\"_blank\">BitTorrent</a> trackers. ",
"open_source": "Open-Source",
"open_source_section_html": " TorrentTunes is fully <a class=\"text-normal\" href=\"https://github.com/tchoulihan/torrenttunes-client\" target=\"_blank\">open-source</a>, feel free to ask for features or bug fixes on <a class=\"text-normal\" href=\"https://github.com/tchoulihan/torrenttunes-client\" target=\"_blank\">github.</a>",
"requests": "Requests",
"requests_section_html": " Make requests for more artists, albums, songs, or features, on the subreddit, <a class=\"text-normal\" href=\"http://www.reddit.com/r/torrenttunes/\" target=\"_blank\">/r/torrentunes</a>.\n ",
"sharing": "Sharing",
"sharing_section_html": " Help out by sharing your own music collection, with the <a class=\"text-normal\" href=\"https://github.com/tchoulihan/torrenttunes-launcher/releases/download/1.0.0/torrenttunes-launcher.jar\" target=\"_blank\">TorrentTunes Client</a>.\n ",
"free": "Free",
"free_section_html": " TorrentTunes is entirely free to use, but you can support it by donating bitcoin <a href=\"javascript:void(0);\" class=\"text-normal\" data-toggle=\"modal\" data-target=\"#donateModal\">here</a>.\n ",
"download": "Download",
"download_torrenttunes": "Download TorrentTunes",
"download_section": "Install the TorrentTunes client",
"install_torrenttunes": "Install TorrentTunes",
"install_message_html": "If you'd like to share music on your computer, and help upload your library to the bittorrent network, install the <a class=\"text-normal\" href=\"https://github.com/tchoulihan/torrenttunes-launcher/releases/download/1.0.0/torrenttunes-launcher.jar\" target=\"_blank\">TorrentTunes client</a>.\n <br>\n <br>\n ",
"requires": "Requires",
"firewall_message": "Firewalls turned off(to allow torrenting)",
"upload_warning_html": "<b>Do not share</b> your music unless you plan to have this client running all day. If you close TorrentTunes, you will no longer be sharing your songs.\n <br>\n <br> I <b>will</b> remove your songs from the server if you do not continue to run the client in order to share them with others.\n <br>\n <br> If you find that your songs have been removed from the server, click Settings -> <i> Clear local Database</i>, and reshare your songs.",
"music_directory": "Music Directory",
"path_required": "A path is required",
"maximum_download_speed": "Maximum Download Speed",
"maximum_upload_speed": "Maximum Upload Speed",
"maximum_cache_size": "Maximum Cache Size",
"download_location": "Download Location",
"save_settings": "Save Settings",
"remove_cached_songs": "Remove Cached Songs",
"clear_local_database": "Clear Local Database",
"uninstall": "Uninstall"
}
}
Done: http://jsoneditoronline.org/?id=5ce465689d6165beebf156810cacc2cc What do you mean with line ""requires": "Requires","?
Dang that was fast, thanks!
I think what you have should work, its for the line:
Requires:
I should have this implemented both client and server side within a few days.
Then is ok that line in spanish :)
Here I am :) I will help you with spanish translation :)