GithubHelp home page GithubHelp logo

pericopist's Introduction

Pericopist

Core: Maven Central Maven plugin: Maven Central

Build Status

Description

The pericopist project consists of different modules. The main task of the project is to generate a message catalog containing all the string literals of a project by parsing its source tree.

Modules

pericopist's People

Contributors

faithcaio avatar pschichtel avatar swolf91 avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

pericopist's Issues

Provide a default context

I'd like to get as much information out of the raw source code and into the messages catalogs as somehow possible.
Translations offen suffer from translators that don't have a clue of the context, a message is used in.
This context information usually has to be added manually where necessary, but we could also add some default context information based on the method the message was extracted from. Methods like sendTranslated() or the annotation fields provide a solid context.
This is also a place where updating ves generating makes a difference: generate would override the translations with the default context while update would not override the contexts already provided

Configurable charset

In the context of I18n It is fundamentally important to be able to specify the charset the the message catalogs will be encoded with.

To follow maven's build-by convention the plugin should take the project.build.sourceEncoding property as the default value for this. The project wide encoding should be consitent accross all files anyway

Follow redirects for remote configurations

URLConnection does not handle HTTP 3XX redirects automatically.
Either handle them manually or switch to a different client (PLEASE)

Maybe something like Apache's http-comonents library.

Verify methods

Just like the verification of annotations this should be simple to implement.
Would be useful for the _() marker method.

Make file generation thread safe

Currently the message catalog is generated right where the user wants it, which might cause conflicts if to instances of the generator work on the same file.

For that reason I suggest writing the file to a temporary location using File.createTempFile() and then replacing the target file atomically using the approach suggested here: http://stackoverflow.com/a/10532430/1827771

Autodetect translation functions

Instead of using the manually created XML configuration to specify the functions that do translation, an auto detection mechanism would be great.

In Java, this could easily be implemented using an annotation with source retention. This annotation could provide the same details as the XML configuration:

@Percopist(singlar = 0, plurals = {1})

Other languages could use comments or source macros.

Extraction from annotation message does not work

The extraction from the label annotation field of that annotation doesn't work:

@IParams({@Grouped(@Indexed(label = "name")),
              @Grouped(req = false, value = @Indexed(label = "universe"))})

but the following works:

@IParams(@Grouped(@Indexed(label = "name")))

Maybe it's because there is more than one Grouped annotation specified in the first case?

Configurable metadata

Messages catalog formats like Gettext also contain meta information.
This information should be configurable for new catalogs and should be retained when updating existing catalogs.

Read messages from constructor calls

I encountered this during the merge of the command branch in the CubeEngine project.
Some of the exceptions there carry user messages which need to be translated.

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.