scala-xgettext | Scala compiler plugin that acts like GNU xgettext command

 by   xitrum-framework Scala Version: Current License: MIT

kandi X-RAY | scala-xgettext Summary

kandi X-RAY | scala-xgettext Summary

scala-xgettext is a Scala library. scala-xgettext has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can download it from GitHub.

Scala compiler plugin that acts like GNU xgettext command to extract i18n strings in Scala source code files to Gettext .po file
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              scala-xgettext has a low active ecosystem.
              It has 24 star(s) with 11 fork(s). There are 7 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 3 open issues and 12 have been closed. On average issues are closed in 26 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of scala-xgettext is current.

            kandi-Quality Quality

              scala-xgettext has 0 bugs and 0 code smells.

            kandi-Security Security

              scala-xgettext has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              scala-xgettext code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              scala-xgettext is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              scala-xgettext releases are not available. You will need to build from source code and install.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of scala-xgettext
            Get all kandi verified functions for this library.

            scala-xgettext Key Features

            No Key Features are available at this moment for scala-xgettext.

            scala-xgettext Examples and Code Snippets

            No Code Snippets are available at this moment for scala-xgettext.

            Community Discussions

            QUESTION

            Is there any way go get GNU xgettext (or something similar) to work with scala files?
            Asked 2020-May-16 at 06:44

            We are using the GNU gettext utilities for creating PO files directly from our code base. The problem is - however - that some of our code base is written in Scala (most of it is Java). We are using gradle for building and deployment.

            As far as I can see, Scala is not a supported language according to the xgettext documentation:

            5.1.3 Choice of input file language

            ‘-L name’

            ‘--language=name’ Specifies the language of the input files.

            The supported languages are C, C++, ObjectiveC, PO, Shell, Python, Lisp, EmacsLisp, librep, Scheme, Smalltalk, Java, JavaProperties, C#, awk, YCP, Tcl, Perl, PHP, GCC-source, NXStringTable, RST, RSJ, Glade, Lua, JavaScript, Vala, GSettings, Desktop.

            Is there any way to use xgettext for Scala files? I have found this sbt compiler plugin that does what we need, but unfortunately we are using gradle instead of sbt.

            ...

            ANSWER

            Answered 2020-Jan-16 at 21:11

            The Perl module Locale::XGettext allows you to write your own xgettext variant for pretty much every text format. You only have to supply a parser for the language/format that is able to extract the strings.

            It is possible to write the parser in Java with minimal Perl boilerplate code around it. I have described the process in a blog post Extending Xgettext With Locale::XGettext. A sample extractor in Java is available at https://github.com/gflohr/Locale-XGettext/tree/master/samples/Java

            Disclaimer: I am the author of all the above-mentioned software and documents!

            If interfacing with Perl code sounds too complicated, you can also just write a parser for Scala in a language of your choice, run that parser before xgettext, and dump all translatable strings into a format that your version of xgettext understands, for example C:

            Source https://stackoverflow.com/questions/59769632

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install scala-xgettext

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/xitrum-framework/scala-xgettext.git

          • CLI

            gh repo clone xitrum-framework/scala-xgettext

          • sshUrl

            git@github.com:xitrum-framework/scala-xgettext.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Consider Popular Scala Libraries

            spark

            by apache

            prisma1

            by prisma

            scala

            by scala

            playframework

            by playframework

            Try Top Libraries by xitrum-framework

            xitrum

            by xitrum-frameworkScala

            scalive

            by xitrum-frameworkJava

            glokka

            by xitrum-frameworkScala

            scaposer

            by xitrum-frameworkScala

            xitrum-demos

            by xitrum-frameworkScala