feat(Help): switch to the Chinese page when using Chinese (#3567)
This commit is contained in:
		
							parent
							
								
									3d1f73fcaf
								
							
						
					
					
						commit
						4373e6da88
					
				@ -16,6 +16,9 @@ const SettingsMenu: React.FC<{
 | 
				
			|||||||
  const data = useCurrentAppInfo();
 | 
					  const data = useCurrentAppInfo();
 | 
				
			||||||
  const { token } = useToken();
 | 
					  const { token } = useToken();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  // 是否是简体中文
 | 
				
			||||||
 | 
					  const isSimplifiedChinese = data?.data?.lang === 'zh-CN';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  const items = [
 | 
					  const items = [
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
      key: 'nocobase',
 | 
					      key: 'nocobase',
 | 
				
			||||||
@ -34,7 +37,7 @@ const SettingsMenu: React.FC<{
 | 
				
			|||||||
    {
 | 
					    {
 | 
				
			||||||
      key: 'homePage',
 | 
					      key: 'homePage',
 | 
				
			||||||
      label: (
 | 
					      label: (
 | 
				
			||||||
        <a href="https://www.nocobase.com" target="__blank">
 | 
					        <a href={isSimplifiedChinese ? 'https://cn.nocobase.com/' : 'https://www.nocobase.com'} target="__blank">
 | 
				
			||||||
          {t('Home page')}
 | 
					          {t('Home page')}
 | 
				
			||||||
        </a>
 | 
					        </a>
 | 
				
			||||||
      ),
 | 
					      ),
 | 
				
			||||||
@ -42,7 +45,14 @@ const SettingsMenu: React.FC<{
 | 
				
			|||||||
    {
 | 
					    {
 | 
				
			||||||
      key: 'userManual',
 | 
					      key: 'userManual',
 | 
				
			||||||
      label: (
 | 
					      label: (
 | 
				
			||||||
        <a href="https://docs.nocobase.com/manual/quick-start/the-first-app" target="__blank">
 | 
					        <a
 | 
				
			||||||
 | 
					          href={
 | 
				
			||||||
 | 
					            isSimplifiedChinese
 | 
				
			||||||
 | 
					              ? 'https://docs-cn.nocobase.com/manual/quick-start/the-first-app'
 | 
				
			||||||
 | 
					              : 'https://docs.nocobase.com/manual/quick-start/the-first-app'
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					          target="__blank"
 | 
				
			||||||
 | 
					        >
 | 
				
			||||||
          {t('User manual')}
 | 
					          {t('User manual')}
 | 
				
			||||||
        </a>
 | 
					        </a>
 | 
				
			||||||
      ),
 | 
					      ),
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user