Giter VIP home page Giter VIP logo

zpplanguage's Introduction

ZPPLanguage

项目主要展示python3全自动脚本,不管是代码还是xib,sb中的文字都会自动导入项目。删除和添加都不用手动维护。

使用方法:

1.在项目中添加需要的国际化语言,使用Localizable生成相应语言的实体文件。

2.项目中添加Run Script,填入

export PYTHONIOENCODING=UTF-8
python3 ${SRCROOT}/${TARGET_NAME}/ZPPScript/ZPPAutoLocalizable.py ${SRCROOT}/${TARGET_NAME}

3.复制粘贴该展示项目中的文件ZPPScript,只需要把文件放入项目目录,不需要导入Xcode工程

4.需要国际化时,同时按下 command + B

完全国际化指南,我会在以后写在blog里,到时候补充教学。

疑问解答:

  • 如果没有生效?

    • 请检查你是否使用了系统的国际化宏,代码部分,只会生成使用了国际化宏的对应字符。 如:
    button.titleLabel.text = NSLocalizedString(@"可能性测试", nil);
    
    • 请检查你是否有python3环境,mac系统自带python2.7环境;我使用的是python3.7。
    • 不要使用压缩包,直接clone项目,然后取项目中的ZPPScript文件。

提示:你可以在每一个.m文件需要国际化的字符里这样写:

button.titleLabel.text = NSLocalizedString(@"可能性测试", “xxxxx.m”);

之后在生成的国际化语言中,你会发现这个国际化的注释会生成。当需要翻译的文字太多时,方便查找是哪个页面的字符。

zpplanguage's People

Contributors

z-figaro avatar zpfigaro avatar

Watchers

James Cloos avatar

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.