Git Product home page Git Product logo

hexo-generator-i18n's Introduction

Hi there 👋

  • hexo-theme-nova 主题将会迎来一波大的更新,主要为
    • 适配 hexo4, hexo5, hexo6
    • 更新文章阅读数功能,会兼容Valine,计划开发最新评论,最热文章等Widget
    • Donate会使用servless实现,使用nodejs作为代理服务,开放给其他博主使用
    • bootstrap升级到5并且去jquery化,进一步优化加载速度
  • QuickAF
    • 底层网络请求库抽取
    • 网络请求库支持OkHttp
    • 计划全面升级到Kotlin + Jetpack
    • 适配Android 8-13
    • 使用compose重写UI
  • Gradle Dependencies:新开发一款分析Gradle项目的依赖树插件,先上IntelliJ市场
    • 生成完整的依赖树
    • 查看指定构建的依赖,展示依赖树及最终计算的依赖组件
    • 高亮显示强制依赖、主动依赖、约束依赖等依赖类型
    • 支持依赖过滤

hexo-generator-i18n's People

Contributors

di0x7c5 avatar doranyun avatar iamapig120 avatar jamling avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

hexo-generator-i18n's Issues

Compatibility issue with icarus theme.

Hello,

I am using the Icarus theme for my blog (https://github.com/ppoffice/hexo-theme-icarus) however it seems icarus expects the language to be a string and not an array.

ERROR Render HTML failed: 2019/07/19/Hello-World/index.html
TypeError: /data/blog/themes/icarus/layout/layout.ejs:2
    1| <!DOCTYPE html>                                                                                
 >> 2| <html <%- has_config('language') ? ' lang="' + get_config('language').substring(0, 2) + '"' : '' %>>                                                                                                 
    3| <head>                                                                                         
    4|     <%- partial('common/head') %>                                                              
    5| </head>                                                                                        
                                                                                                      
get_config(...).substring is not a function                                                           
    at eval (eval at compile (/data/blog/node_modules/ejs/lib/ejs.js:633:12), <anonymous>:11:77)      
    at returnedFn (/data/blog/node_modules/ejs/lib/ejs.js:668:17)                                     
    at Theme._View.View._compiled (/data/blog/node_modules/hexo/lib/theme/view.js:123:48)             
    at Theme._View.View.View.render (/data/blog/node_modules/hexo/lib/theme/view.js:29:15)            
    at /data/blog/node_modules/hexo/lib/theme/view.js:40:23                                           
    at tryCatcher (/data/blog/node_modules/bluebird/js/release/util.js:16:23)                         
    at Promise._settlePromiseFromHandler (/data/blog/node_modules/bluebird/js/release/promise.js:517:31)                                                                                                    
    at Promise._settlePromise (/data/blog/node_modules/bluebird/js/release/promise.js:574:18)         
    at Promise._settlePromise0 (/data/blog/node_modules/bluebird/js/release/promise.js:619:10)        
    at Promise._settlePromises (/data/blog/node_modules/bluebird/js/release/promise.js:699:18)        
    at _drainQueueStep (/data/blog/node_modules/bluebird/js/release/async.js:138:12)                  
    at _drainQueue (/data/blog/node_modules/bluebird/js/release/async.js:131:9)                       
    at Async._drainQueues (/data/blog/node_modules/bluebird/js/release/async.js:147:5)                
    at Immediate.Async.drainQueues [as _onImmediate] (/data/blog/node_modules/bluebird/js/release/async.js:17:14)                                                                                           
    at processImmediate (internal/timers.js:439:21)

Is there any way to fix this? For example use a different config setting for the i18n generator and set language to the language currently being rendered?

As a workaround I was able to just delete the line, but I don't think that is a great solution.

Doesn't work

Hello, I installed the package and modified the _config.yml as instructed in your readme
But I can't modify the language of my post/page in the post editor.

Is there something else I need to do?

Thank you

如何实现post的同一篇文章不同语言版本?

配置如下:

language:
  - en
  - zh
i18n:
  type: [page, post]
  generator: [index, archive, category, tag]

我在source目录下建立zh目录,实现了about、category、tag多语言功能。
但是不知道如何才能实现首页index和发帖post的多语言?
我需要一个全站一一对应切换的多语言站点,谢谢!

Can't bring array from language file??

I'm using Hexo with i18n plugin to bring info from language files. But i can't bring array the only result i can extract is the single string.
If this feature is not implemented then it is required otherwise how can i call array of the language file!!??
regards
en.yml

team:
    team_info:
        person_1:
              social_media:
                  facebook: '#'
                  twitter: '#'
                  Instagram: '#'

__('team.team_info.person_1.social_media')

translate layouts based on YAML files stored in _data

Is it possible to get translated the pages which include variables from YAML files _data folder?
It would be great hexo-generator-i18n to treat the language files under _data folder (like _data/en/some.yml and _data/ru/some.yml) as it does with _posts folder

more than 2 langs malfunction

I have 3 languages configured in _config.yml's 'language', and when generating archive page for the 3rd language some url strings become prepended with previos lang as such: 'lang2/lang3/tag/tagname'.

Possibly here the copy.data member after extend()'ing remains the reference, and something like the _.cloneDeep() should be used instead:

function i18n_archive(locals) {
...
for (var i = 1; i< languages.length; i++){
var l = languages[i];
var copy = {};
_.extend(copy, item);
copy.path = l + '/' + item.path;
copy.data.base = l + '/' + item.data.base; // .base contains the string from previous iteration
...
result.push(copy);

getting started

Hi,

I've just add your module to my blog, but it's not clear how to setup multiple languages. Do I need to add the options into my _config.yml? Could you please add more information?

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.