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

中英文混合导致多语言博客中语言选择失效 #319

Closed
alberthe opened this issue Jan 2, 2021 · 6 comments
Closed

中英文混合导致多语言博客中语言选择失效 #319

alberthe opened this issue Jan 2, 2021 · 6 comments

Comments

@alberthe
Copy link

alberthe commented Jan 2, 2021

问题描述
中英文混合导致多语言博客中语言选择失效。请清理一下代码中的语言。要么中文,要么英文。
环境信息

复现步奏
比如:index.php文件中:

get_header(); ?>
<div class="k-main <?php echo kratos_option('top_select', 'banner'); ?>" style="background:<?php echo kratos_option('g_background', '#f5f5f5'); ?>">
    <div class="container">
        <div class="row">
            <div class="col-lg-8 board">
                <?php if(is_home() && kratos_option('g_carousel', false)){
                  kratos_carousel();
                } if(is_search()){ ?>
                    <div class="article-panel">
                        <div class="search-title"><?php _e('搜索内容:', 'kratos');the_search_query(); ?></div>
                    </div>
                <?php }
                if ( have_posts() ) {
					while ( have_posts() ){
						the_post();
						get_template_part('/pages/page-content', get_post_format());
					}
				}else{ ?>
                    <div class="article-panel">
                        <div class="nothing">
                            <img src="<?php 
                            if(!kratos_option('g_nothing')){
                                $img = ASSET_PATH . '/assets/img/nothing.svg';
                            } else {
                                $img = kratos_option('g_nothing', ASSET_PATH . '/assets/img/nothing.svg');
                            }
                            echo $img; ?>">
                            <div class="sorry"><?php _e('很抱歉,没有找到任何内容', 'kratos'); ?></div>
                        </div>
                    </div>
                <?php } 
                pagelist();
                wp_reset_query(); ?>
            </div>
            <div class="col-lg-4 sidebar d-none d-lg-block">
                <?php dynamic_sidebar('sidebar_tool'); ?>
            </div>
        </div>
    </div>
</div>
<?php get_footer(); ?>
@seatonjiang
Copy link
Owner

你这里说的失效具体是什么情况?代码里写的这些都是没有问题的,翻译平台地址 https://vtrois.crowdin.com/kratos ,这些中文都是符合代码规范的写法。

@alberthe
Copy link
Author

alberthe commented Jan 3, 2021 via email

@seatonjiang
Copy link
Owner

中文日期的话在下个版本推送的时候会进行修复

@alberthe
Copy link
Author

alberthe commented Jan 3, 2021 via email

seatonjiang added a commit that referenced this issue Jan 6, 2021
@seatonjiang
Copy link
Owner

问题修复了,下个版本推送。

@alberthe
Copy link
Author

alberthe commented Jan 23, 2021 via email

WenqianC pushed a commit to WenqianC/kratos that referenced this issue Feb 26, 2021
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

No branches or pull requests

2 participants