Skip to content

Scala 2.10/2.11 compiler plugin that acts like GNU xgettext command to extract i18n strings from PlayFramework project's Scala source code and twirl templates files to message file

License

Notifications You must be signed in to change notification settings

georgeOsdDev/play-xgettext

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

i18n messages extractor for PlayFramework

This project is forked from xitrum-framework/scala-xgettext.

This plugin extract Internationalized message keys from scala source codes and twirl templates where play.api.i18n.Messages is used in your PlayFramework project.

Demo

Demo

Usage

Add to application's build.sbt

autoCompilerPlugins := true

addCompilerPlugin("com.github.georgeosddev" %% "play-xgettext" % "0.1")

// If you don't need comment about scala code line
// scalacOptions += "-P:play-xgettext:hideLines"

Create empty messages.default to project root

cd Your_PlayFramework_Project_Root
rm -rf ./messages.default
touch messages.default

Compile project

activator clean compile

All keys used with play.api.i18n.Messages in your project will be extracted into messages.default. And then you can copy it to your internationalized message file like conf/messages.ja

About

Scala 2.10/2.11 compiler plugin that acts like GNU xgettext command to extract i18n strings from PlayFramework project's Scala source code and twirl templates files to message file

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Scala 100.0%