Disable tabs in google spreadsheet exports

More
8 months 1 week ago #3365 by GFX47
Hey, is it possible to store all the terms in a single tab of a google spreadsheet?
I'm croud-sourcing the localization of my game and share the exported google spreadsheet with players, giving them write rights on the language (column) they are willing to help translate. Right now I have to do it for each category/tab, which is very time consuming and prone to errors.

Please Log in or Create an account to join the conversation.

More
8 months 1 week ago #3378 by Frank
Hi,
As you mentioned, I2 Localization exports each base Category into a separate Tab in the Google Spreadsheet.
There is no code to handle merging all into a single sheet, but that can be done by modifying the function

Export_Google_CreateData()
in line 37 of the file Assets\I2\Localization\Scripts\LanguageSource\LanguageSourceData_Export_Google.cs

I haven't tested this (as I'm not in my computer at the moment, but it should work by adding the two lines I marked
		string Export_Google_CreateData()
		{
			List<string> Categories = GetCategories(true);
			StringBuilder Builder = new StringBuilder();

			bool bFirst = true;
			foreach (string category in Categories)
			{
				if (bFirst)
					bFirst = false;
				else
					Builder.Append("<I2Loc>");

				#if !UNITY_EDITOR
				bool Spreadsheet_SpecializationAsRows = true;
				#endif


				category = ""; //<- Add this line so that it exports all terms (instead of just the default category)


				string CSV = Export_I2CSV(category, specializationsAsRows:Spreadsheet_SpecializationAsRows);
				Builder.Append(category);
				Builder.Append("<I2Loc>");
				Builder.Append(CSV);


				break;   //<--- add this line so that it only exports the Default category

			}
			return Builder.ToString();
		}

If it doesn't work, let me know and as soon as I get back to my computer I will do a test and update this code.
Hope that helps,
Frank

Are you :-) Give I2L 5 stars!
Are you :-( Please lets us know how to improve it!
To get the betas as soon as they are ready, check this out

Please Log in or Create an account to join the conversation.

Time to create page: 0.121 seconds
Template by JoomlaShine