/*

name: Tongue
description: A really basic class for storing dropr translations

package: dropr
copyright: All rights reserved

requires:
- core

provides: Tongue

...
*/

var Tongue = new Class({

	/////////////////////////////////////
	// Init
	/////////////////////////////////////

	initialize: function(){
		// nothing for now
	},




	/////////////////////////////////////
	// Translations
	/////////////////////////////////////

	// overall
	
	login: 'Login',

    upgrade : 'Upgrade',

    preparing : 'preparing',
	
	register: 'Sign up',
		
	loading: 'Loading...',

	checking: 'Checking...',
	
	save: 'Save',
	
	saving: 'Saving...',
	
	saved: 'Saved',
	
	send: 'Send',
	
	reply: 'Reply',
	
	sending: 'Sending...',
	
	jumping: 'Jumping...',
	
	word_delete: 'Delete',
	
	deleting: 'Deleting...',
	
	importing: 'Importing...',
	
	done: 'Done!',
	
	cancel: 'Cancel',
	
	close: 'Close',
	
	changed: 'Changed',
	
	try_again: 'Try again',
	
	no: 'Nope',
	
	remove: 'Remove',
	
	resume: 'Resume',
	
	next: 'Next',
	
	sure_q: 'Sure?',
	
	yes: 'Yes',
	
	yes_delete: 'Yes, Delete',
	
	yes_discard: 'Yes, Discard',
	
	yes_logout: 'Yes, Logout',
	
	member: 'Member',
	
	error: 'Error',
	
	follow: 'Follow',
	
	following: 'Following',
	
	publish: 'Publish',
	
	published: 'Published',
	
	collect: 'Collect',
	
	uncollect: 'Uncollect',
	
	view_fullscreen: 'View Fullscreen',
	
	splash: 'Splash',
	
	save_to_continue: 'Enter and save the required details to continue!',
	
	generate_more: 'Generate one more',
	
	hide_for_good: 'Hide for good.',
	
	/* old ones to be revised */

	wrong_invite_code: 'Wrong code. Try again',

	used_invite_code: 'Used. Try another',

	sending_invite_request: 'Let us have a look...',
	
	wrong_password: 'Wrong Password. Try Again?',

	info_logged_out: function(sitepath){
		return '<strong>It seems you have been logged out</strong>.<br/><a href="javascript: window.location.reload(true);">Click here</a> to come back to us.';
	},

	info_connection_error: '<strong>Connection error.</strong><br/>Check your cables and try again!',

	info_general_error: "<strong>Ooops.</strong><br/>Something went wrong, try again. If that doesn't help, let us know!",
	
	info_confirm_delete: "You can't undo these things. <strong>Sure?</strong>",
	
	info_no_cookies_error: 'No cookies error. Enable cookies!<br/><br/>- Monster',
	
	switch_html_visual: 'Switch between HTML and visual view.',
		
	//click_to_add: 'Click to add',
	
	editator_empty_text: 'Edit..',
	
	set_no_color: 'No color, please.',
	
	//wrong_email_try_again: 'Wrong Email. Try Again',
	
		
	open_splashup: 'Fullscreen Splash Up!',
	
	// portfolio
	
	drop_projects: 'Drop projects',
	
	edit_design: 'Design',
	
	edit_settings: 'Settings',
	
	drop_pieces: 'Drop & Edit Pieces',
	
	project_details: 'Project details',
	
	
	// style editor
	
	info_bg_upload_limit: 'Nay! You can keep <strong>only 8 backgrounds here</strong>, delete some to make room.',
	

	// dashboard

	cup_time_left_info: function(time){
		return 'Next Cup of Inspiration in '+ this.convertTime(time) +' minutes!';
	},

	it_seems_you_have_account: '<strong>It seems you already have an account!</strong> <br/>If it\'s not yours, logout and try again.',
	
	you_joined_collective: 'You joined this collective!',
	
	another_one_q: 'Another one?',
	
	send_to_email: 'Send to email',
	
	info_add_receivers: '<strong>Add receivers.</strong><br/>Enter names of some Dropr users or collectives and press enter or coma.',
	
	
	// network
	
	joined_collective: 'Just joined!',
	
	info_last_admin: "You're the last and the only admin of this collective. <strong>Delete collective?</strong>",
	
	delete_collective: 'Delete collective',
	
	leave_collective_q: "You're about to leave this collective. <strong>Sure?</strong>",
	
	yes_leave: 'Yeah, Leave',
	
	info_you_degrade_admin: "You won't be able to manage this collective anymore. <strong>Sure?</strong>",
	
	yes_degrade: 'Yes, degrade me',
	
	make_admin: 'Make admin',
	
	remove_admin: 'Remove admin',
	
	/*role_in_collective: 'Role in the collective',*/
	
	click_to_add_role: 'Click to add role',
	
	remove_member: 'Remove member',
	
	invites_sent: 'Invites Sent!',
	
	
	// manager
	
	info_delete_portfolio_q: '<strong>Delete Portfolio?</strong><br/>You will loose <strong>all</strong> the content inside. Really, definitely, absolutely sure?',
	
	
	
	// drop
	
	give_gallery_name: 'Give it a name <i>like &quot;Photography&quot;, &quot;Music&quot; or such</i>',
	
	untitled_gallery: 'Untitled gallery',
	
	info_delete_gallery_q: '<strong>Delete a Gallery?</strong><br/>You will loose <strong>all</strong> the content inside. Really, definitely, absolutely sure?',
	
	warning_is_view_locked: 'It seems there are some unsaved changes.',
	
	info_abort_edit_q: 'It seems there is some stuff being uploaded or edited. <strong>Abort?</strong>',
	
	cancel_edit: 'Abort editing',
	
	info_delete_project_q: '<strong>Delete a Project?</strong><br/>You will loose all the stuff inside. Sure?',
	
	vimeo_video_not_accessible: "Nay. The video doesn't exist or it's private or something. <br/>If the URL is fine, check if the video is public on Vimeo. That should help!",
	
	give_it_name: 'Give it a name',
	
	describe_it: 'Describe it',
	
	enter_url: 'Enter URL',
	
	give_it_title: 'Give it a title (not required)',
	
	enter_text: 'Enter text',
	
	give_it_caption: 'Give it a caption',
	
	//info_not_enough_credits: '<strong>Seems you have no dropees left.</strong><br/><br/>Give us a shout if you need more for testing!',
	
	info_upload_queue_errors: 'There were errors and some files were skipped in the queue. <br/>Check the stuff marked red.',
	
	info_upload_item_error: 'Error. Click to check what went wrong.',
	
	credits_0: 'Need more?',
	
	credits_1: 'Almost empty!',
	
	credits_2: 'Mhm..',
	
	credits_3: 'Whoah!',
	
	info_queue_too_many_selected_for_credits: function(sel, cr){
		return '<strong>You are trying to add '+ sel +' files, but you have only '+ cr +' dropees left.</strong><br/><br/>Give us a shout if you need more for testing!'
	},
	
	info_queue_too_many_selected: function(max, sel) {
		return '<strong>You can queue up to '+ max +' files at once.</strong><br/>Only '+ max +' files were loaded (out of '+ sel +' you selected).'
	},
	
	info_queue_too_big_files: function(max, n) {
		return ''+ n +' files were <strong>bigger than the max '+ max +' megabytes</strong>.<br/>They were not added to the queue.'
	},
	
	info_file_too_big: function(var1, var2){
		return 'Hey, the file is around '+ var1 +' megabytes. That&#39;s bigger than the maximum '+ var2 +' MB.<br/>Try compressing it or something.'
	},
	
	info_abort_changes_q: "Seems like you've edited some of your stuff. <strong>Do you want to discard changes?</strong>",
	
	
	// settings
	
	/*username_taken: 'Meh. This one seems to be taken',
	
	username_chars_info: "Use letters, numbers and _'s. Minimum 3 chars.",*/
	
	wiping_records: 'Wiping records..',
	
	error_info_short: 'OOPS. Error. Try again',
	
	delete_cv_q: 'Delete the CV?', 	
	
	// connections
	
	//connect_to_vimeo_info: "If you're not logged in on Vimeo, just log in or join on the next page and then authorize. Easy!",
	
	connect_window_info: "A new tab (or window) will open. Connect there and come back to us. Easy!",
	connect_window_when_ready_info: "Job done? Click 'done' below and you can upload and import videos!",

	ok_connect: "Ok, let's Connect!",
	
	loading_vimeo: 'Loading Vimeo...',
    loading_soundcloud: 'Loading SoundCloud...',
    loading_flickr: 'Loading Flickr...',
	
	remove_connection_q: '<strong>Remove the connection?</strong>',
	
    info_soundcloud_connected: '<strong>Success!</strong> <br/>You can import and upload videos now.',
    info_vimeo_connected: '<strong>Success!</strong> <br/>You can import and upload videos now.',
	
	// imports
	
	import_fetching: "We're fetching data. It could take up to a few minutes if you have a lot of content on",
    importing_now : "We're importing your pieces. It can take a few moments!",
    import_not_all : "Import only first ",
    import_complete : "<h1>Import complete!</h1><p>You can now edit pieces settings, positions and drag them between projects and galleries.</p><p>Number of imported files: </p>",
    import_with_errors : " imported with errors.",
    import_complete_and_error : "Import completed. From ",

    uploads_left    : "uploads left: ",
    to_upload       : "pieces to upload: ",

  //embed
  
	image_conversion_in_progress: 'Image conversion in progress. Try again later.',

	/////////////////////////////////////
	// Utils
	/////////////////////////////////////
	
	/*
	convertTime: function(t) {
		var ct;
		var minutes=t/60>>0;
		var seconds=t%60>>0;
		if (seconds>=0&&seconds<10) {
			ct=minutes+":0"+seconds;
		} else {
			ct=minutes+":"+seconds;
		}
		return ct;
	}
	*/
	
	convertTime: function(secs) {
		var times = new Array(3600, 60, 1);
		var time = '';
		var tmp;
		for(var i = 0; i < times.length; i++){ // skip hours if 00
			tmp = Math.floor(secs / times[i]);
			if(!(tmp < 1 && i==0)){
			  if(tmp < 1){
			     tmp = '00';
			  } else if(tmp < 10){
			     tmp = '0' + tmp;
			  }
			  time += tmp;
			  if(i < 2){
			     time += ':';
			  }
			}
			secs = secs % times[i];
		}
		return time;
	}
	
});

