I have a node.js project and I am using I18next to localize it, with the gettext http://i18next.com/node/pages/doc_init.html#gettext backend.
My template engine i am using with this project is https://github.com/bminer/node-blade which is similar to jade.
Then I use the https://www.npmjs.org/package/i18next-parser library with i18next -r -o ../tmp -l en command to extract all the msgid's and create a dev.json file.
Once this is done, i use i18next-conv -l en -s ../dev.json -t dev.po to convert this to a gettext format.
From this I would create a fr.po file and then get this translated to french, as an example.
So far this process works fine, the question is, how best to keep all the msgid's should for example, I need to add new strings to the catalog and then merge these into the fr.po file without loosing any strings which have already been translated?
any advice much appreciated.
Related
I am building a nodejs based small framework for my application. Say, the name of the framework is coffee-cup, situated in the folder of the same name. The folder has a structure inside. To simplify the work of developers, I want to add few command line methods. For example, consider following folder structure.
coffee-cup
|--config
|--cups
|--cup1
|--index.js
|--report
|--cup-config
|--cup2
|--index.js
|--report
|--cup-config
We see that inside cup1 and cup2, there is same structure. If a developer wants to add a new cup called cup3, they will need to create a folder called cup3 and add the underlying structure into that folder.
To automate this task, I am thinking of a way to build a command line utility like
$ coffee-cup new cup cup3
that can work on linux, windows or mac terminals.
Expected result of Entering this command in terminal: would create a new folder called cup3 in cups folder and will create the file index.js and folders reporting and cup-config inside the folder cup3.
I can create folder using fs.mkdirSync()and file using fs.writeFile().
I am however, unable to find a way to make the terminal identify the coffee-cup command. If terminal identifies this command, it should collect the following arguments and pass on to the nodejs file and I can continue from there. What I know is, that there exist npm packages like inquire which are useful in creating command line applications. But it does not help in building command line utilities like I mentioned above.
So I am looking for guidance on making terminal identify the coffee-cup command, collect the following arguments and pass on everything to a nodejs file. It is just like we install npm and then terminal starts identifying the npm keyword and subsequent commands like $ npm install. Any help by experts will be highly appreciated.
I am using pocketsphinx for offline speech recognition. I use lmtool to get language model and dictionary.But the language model has extension .lm but pocketsphinx requires .lm.bin file. So, how can I convert this?
You just need to:
1. Download http://sourceforge.net/projects/cmusphinx/files/sphinxbase/0.8/sphinxbase-0.8-win32.zip
Unpackage sphinxbase-0.8-win32.zip. The folder will be PATH\
In my case thats C:\Users\carope9\Desktop\
Move lm file to PATH\sphinxbase-0.8-win32\bin\Release
Open CMD and write cd PATH\sphinxbase-0.8-win32\bin\Release
Write sphinx_lm_convert -i YOUR_LM_FILE -o YOUR_LM.BIN_FILE
example: sphinx_lm_convert -i es_ES.lm -o es_ES.lm.bin
Your new lm.bin file will be into PATH\sphinxbase-0.8-win32\bin\Release
If you don't use Windows need to download source files from http://sourceforge.net/projects/cmusphinx/files/sphinxbase/0.8/sphinxbase-0.8.tar.gz but I don't know how to install it I'm reading https://sourceforge.net/p/cmusphinx/discussion/help/thread/c67930c0/?limit=25
P/D: According to some people this doesn't work, it worked for me and I don't know how to correct their error. Hope it helps you.
I'm new to Gromacs (and protein-analysis coding in general, but have some experience with python-based code). I'm trying to convert a .ene file received from pyDock to a more readable format (it currently opens
When I try to use different commands that the gromacs guide says accept .ene files (gmx eneconv and gmx dump), for example
gmx eneconv -f project.ene -o converted.edr
and
gmx dump -e project.ene -om read.mdp
I get the error
File 'project.ene' cannot be used by GROMACS because it does not have a recognizable extension.
The following extensions are possible for this option:
.edr
I have updated my OS and re-installed gromacs. My installation is working according to the 'Getting Started' page.
I am also open to suggestions for other programs to open and read the .ene file type.
Thanks!
"ene" is short for "energy" which contains binary data for energy, temperature, volume, etc, and is only used in older version of Gromacs. In new version of Gromacs this is replaced by "edr" file which contains portable binary data. See "gmx dump -h", you will find the following lines:
Options to specify output files:
-o [<.edr>] (fixed.edr)
Energy file
If you insist on using ene file, you should install an older version of Gromacs.
I have the binary file to install a component when i am running using ./filename.bin it comes into console mode and asks for language selection and directory selection and all , i tried ./filename.bin -r path/response.properties, help me if anyone knows.
as you said that you have already tried using ./filename.bin -r path/response.properties and still it does not work then , do one thing go for the console mode while creating the response file like :-
./filename.bin -i console -r path/response.properties
then install what you are installing, the response file will capture that.
And to use that later you can just include tat while running your bin file to take the input from response file.
I installed Twig, it works well - however, I chose a different method of install:
curl -s getcomposer.org/installer | php -d detect_unicode=Off
and everything is in vendor/Twig directory.
However, what I'm wondering is, can you install extensions for Twig via yml without using Symfony - mine is a plain Composer-downloaded Twig install?
I was considering installing this extension but can't figure out how to get the path() function to work - I checked on Google (only related to Symfony) and little in Twig's manual - so what should I do - my simple PDO/PHP/MySQL list of employees [test data] works but I am trying to paginate this.
Any help is appreciated!