Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Turkish to the text.js file #3809

Merged
merged 2 commits into from
Apr 7, 2024
Merged

Update Turkish to the text.js file #3809

merged 2 commits into from
Apr 7, 2024

Conversation

fatih5228
Copy link
Contributor

I added Turkish to the text.js file. I would appreciate it if you could update it. Have a good day!

I added Turkish to the text.js file. I would appreciate it if you could update it. Have a good day!
I added Turkish to the text.js file. I would appreciate it if you could update it. Have a good day!
@fatih5228
Copy link
Contributor Author

fatih5228 commented Apr 3, 2024

Hi. Can you edit the following line of code in the text.js file? When I select the language, this part stays in English.
@lanewei120


 function TranslatePage()
{
	let strLang=GetQueryString("lang");
	if(strLang!=null)
	{
		//setCookie(LANG_COOKIE_NAME,strLang,LANG_COOKIE_EXPIRESECOND,'/');
		localStorage.setItem(LANG_COOKIE_NAME,strLang);
	}
	else
	{
		//strLang=getCookie(LANG_COOKIE_NAME);
		strLang=localStorage.getItem(LANG_COOKIE_NAME);
	}
	
	//alert(strLang);
	
	if( !LangText.hasOwnProperty(strLang) )
		strLang="en";

    let AllNode=$(".trans");
	let nTotal=AllNode.length;
	for(let n=0;n<nTotal;n++)
	{
		let OneNode=AllNode[n];
		
		let tid=$(OneNode).attr("tid");
		if( LangText[strLang].hasOwnProperty(tid) )
		{
			$(OneNode).html(LangText[strLang][tid]);
		}
		else if(strLang!='en' && LangText['en'].hasOwnProperty(tid) )
		{
			$(OneNode).html(LangText['en'][tid]);
		}		
	}
}

Edited version of the screenshot:
bambustudio1 9_turkish

@lanewei120
Copy link
Collaborator

Hi. Can you edit the following line of code in the text.js file? When I select the language, this part stays in English. @lanewei120


 function TranslatePage()
{
	let strLang=GetQueryString("lang");
	if(strLang!=null)
	{
		//setCookie(LANG_COOKIE_NAME,strLang,LANG_COOKIE_EXPIRESECOND,'/');
		localStorage.setItem(LANG_COOKIE_NAME,strLang);
	}
	else
	{
		//strLang=getCookie(LANG_COOKIE_NAME);
		strLang=localStorage.getItem(LANG_COOKIE_NAME);
	}
	
	//alert(strLang);
	
	if( !LangText.hasOwnProperty(strLang) )
		strLang="en";

    let AllNode=$(".trans");
	let nTotal=AllNode.length;
	for(let n=0;n<nTotal;n++)
	{
		let OneNode=AllNode[n];
		
		let tid=$(OneNode).attr("tid");
		if( LangText[strLang].hasOwnProperty(tid) )
		{
			$(OneNode).html(LangText[strLang][tid]);
		}
		else if(strLang!='en' && LangText['en'].hasOwnProperty(tid) )
		{
			$(OneNode).html(LangText['en'][tid]);
		}		
	}
}

Edited version of the screenshot: bambustudio1 9_turkish

ok, we will do it

@lanewei120 lanewei120 requested a review from StoneLiBambu April 6, 2024 13:48
@lanewei120
Copy link
Collaborator

thanks for doing this

@lanewei120 lanewei120 merged commit 0314576 into bambulab:master Apr 7, 2024
2 checks passed
@fatih5228 fatih5228 deleted the patch-3 branch April 7, 2024 01:26
@fatih5228 fatih5228 restored the patch-3 branch April 7, 2024 01:27
lanewei120 pushed a commit that referenced this pull request Apr 8, 2024
github pull_request: #3809
Change-Id: I8e724de3b9ecfefc54f814944198fd98ff2586e6
lanewei120 pushed a commit that referenced this pull request Apr 8, 2024
github pull_request: #3809
Change-Id: I8e724de3b9ecfefc54f814944198fd98ff2586e6
hadess pushed a commit to hadess/BambuStudio that referenced this pull request Jun 22, 2024
github pull_request: bambulab#3809
Change-Id: I8e724de3b9ecfefc54f814944198fd98ff2586e6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants