Salamek / cron-descriptor

A Python library that converts cron expressions into human readable strings.
MIT License
160 stars 38 forks source link

Korean Translation missing mo file. #46

Closed Borgrabbit closed 3 years ago

Borgrabbit commented 3 years ago

locale folder doesn't have a .mo file for ko_KR locale.( which makes module doesn't accept the locale code)

I've converted ko_KR.po -> ko_KR.mo file and added to locale folder and when I tested with following code it works without any problem.

from cron_descriptor import get_description, Options

if __name__ in '__main__':
    options = Options()
    expr_ls = [
        '0 30 3,9,14,16,19,23 ? * SAT-SUN *'
        , '0 0 16 ? * SAT *'
        , '0 0 23 1/1 * ? *'
        , '0 20 3,9,14,16,19,23 ? * SAT-SUN *'
        , '0 0/1 * 1/1 * ? *'
        , '0 0,30 15,16,17,18,19,20,21,22,23,1,2,3 1/1 * ? *'
        , '0 0/15 * 1/1 * ? *'
    ]
    options.locale_code = 'ko_KR'
    for expr in expr_ls:
        print(get_description(expr, options))

    options.locale_code = 'cs_CZ'
    for expr in expr_ls:
        print(get_description(expr, options))

I suspect .mo file got filtered out by ignore list when it was pushed. Would it be possible for me to make PR?

Salamek commented 3 years ago

Closed by #47