Questions regarding language translation using .pot file - gettext

I have a .pot file that I wish to translate to a native language and get the final .po file. At this moment, the only plausible option that I have is to open the set of .pot files in a text editor and convert each phrase to the native language.
I would like to know if this can be automated by using some tool/software . I tried POEDIT (in Windows) for converting my .pot file to the native language (Hindi) but it could not perform a single translation. Please provide some inputs.
Thanks

You can use Translator Toolkit provided by Google.
https://translate.google.com/toolkit
(you need a Google account)
Before uploading your file you have to change the file extension to .po so google can accept it.
After translation; download the translated file and use your editor of choice to manage and optimize your translations.

Related

How to parse a C/C++ header file in dart?

I'm working on a flutter desktop app which should (according to my plan) has the ability to open C/C++ header files (as a plain text) and parse the source code and find all structures and get theirs properties, is there any existing package fits my need, or, maybe I should go with regex instead?

Is it possible to write a binary file import extension for vs code?

I want to display some informations of a binary file in vs code.
Is it possible to write an extension for vs code, such that when selecting that file in the Explorer (or opening it directly) you see some text extracted from the binary file by that extension?
So the core functionality of that extension would be (simplified) a binary to text converter.
Any suggestions?
The VS Code team member has confirmed they do not have support for registering content providers for binary files in my issue.
I've inspected the workspace.onDidOpenTextDocument and window.onDidChangeActiveTextEditor APIs, but neither seems to be called when opening binary files.
Is there a way to display fallback content using registerTextDocumentContentProvider (or otherwise) for binary files?
That's why these types all carry Text in their names, TextEditor, TextDocument, etc. They can only handle textual, not binary data ;-)
No explanation as to why this works for PDFs, probably special-cased.

Programmatically convert Doc(x) files to PDF using Microsoft Word

We are developing a Java application that needs to programmatically convert .rtf, .doc and .docx files to PDF files.
Formatting is important to us, so we need the page numbers to be the same between a source file and a target PDF file, and the contents of each page being the same as the original file.
We have tried out open source solutions, such as JODConverter to invoke a LibreOffice of OpenOffice installation, Docx4j and XDocReport. The best formatting was achieved with LibreOffice. However, even in that case, the pages were different (for example, a 87-page .rtf file results in an 80-page PDF file).
So, we think that the ideal way to make the conversion would be to somehow invoke Microsoft Word though our Java application, and make the conversion with it. That would produce PDF files that have the same formatting as the original files.
Is this possible in any of the following ways:
An API that is directly invokeable through Java?
An API that is invokeable through a .Net language and we would use that with something like JACOB?
A 3rd party library that uses a Microsoft Word installation under the hood (something like JODConverter for Word)?
A CLI interface supported by Word (relevant question)?
Something else?

How to write a MsWord (.doc) file in Objective C?

I need to write pure Msword file in objective C.
I have been writing .txt file till now but when i write a .doc file i'm facing encoding issues with all encoding schemes.
Microsoft provide library in visual studio to play with .doc files which is not available in Xcode.
So is there any way to make it happen?
You can extract the code from e.g. OpenOffice project. This is C++ code, but you can use a wrapper around. This will be a lot of work.
If it's an option for you:
On the server use Microsft VSTO to create a document (doc,els,ppt...) using ServerDocument class and passing the data that you collect on the client. Then you download that file and your phone.
Sounds like you are trying to port MS word. Basically u need to write XML files and zip them in a particular manner. Check out the markup specification here
http://msdn.microsoft.com/en-us/library/cc313105%28office.12%29.aspx
if it's .docx, you may compose an XML file and rename it. With .doc you may have to do it with your own wrapper.

Programmatically convert DITA to FrameMaker

Is there a toolkit available (paid or otherwise) to help with programmatically converting a DITA document to a FrameMaker one?
I'm attempting to make an application that converts to multiple formats from DITA. I know I can use the DITA Open Toolkit for most of my needs, but I need to be able to create a native FrameMaker document as well.
Programing language doesn't matter, altho I prefer Java as my application will be web based.
Arbortext import-export is industrial strength and very flexible. You could also try MIFtoGo. Conversion is tricky because source documents are rarely consistent. Conversion without cleanup before and after is next to impossible.
DITA-FMx is what you need:
http://leximation.com/dita-fmx/
Using DITA-FMx, you generate a FrameMaker book from your ditamap (and then save the FM book as PDF).
There is a movie on YouTube that shows you how the process goes. Just search for "PDF Publishing with DITA-FMx 1.1" (Stack Overflow does not allow me to post a second URL here yet)
If you like to see an example, just send me a small sample of a ditamap and I'll generate a FrameMaker book for you.
The disclaimer is that if you're converting a lot of documents you'll be better off with a supported well-integrated solution that fully uses FrameMaker's DITA support. If you're looking to do it on the cheap though (and who isn't) you can do this conversion by using straight XSLT and framemaker templates.
First create the framemaker template to handle the appearance of the document, then use XSLT to map your DITA content to the content tags you've used in Framemaker.
You can use the free SAXON xslt interpretor to do the actual conversion.
Here is some of adobe's reference material on authoring new DITA documents:
http://help.adobe.com/en_US/FrameMaker/8.0/05h/dita.html
Info on Framemakers's native XML support is here:
http://www.adobe.com/products/framemaker/pdfs/xml_fm7.pdf
The framemaker manuals also cover the subject quite extensively. Hope that helps
Indeed FM supports loading DITA files (I tried FM10 and newer) but to automate conversion to .FM format you either use the internal scripting mechanism which is still some manual work.
I have found an existing free utility that can do most basic operations like opening a file, 'saving as' another format and closing it.
tool name is DZBatcher
Example DZbatcher batch file:
Open "c:\My Dita Files\Doc1.dita"
SaveAs -d "c:\My FM Files\Doc1.fm"
Close "c:\My FM Files\Doc1.fm"
Open "c:\My Dita Files\Doc2.dita"
SaveAs -d "c:\My FM Files\Doc2.fm"
Close "c:\My FM Files\Doc2.fm"
Exit
Adobe has a framework called RoboHelp which is probably the infrastructure for this, but I didn't dig deeper as this utility did the job perfectly.
In my SW flow, I created this batch file using a python script that scan all the docs in an input directory and added 3 lines per file as seen above.
I used FM2015 for this task.
Bryan, after a decade's experience converting Frame, Word, Interleaf, etc to XML, I'll tell you that Adobe doesn't have it fully covered. The DITA support in FrameMaker works best if you also have the Leximation plug-in or know how to program the Adobe proprietary EDD. You can't do DITA specialization without programming the EDD in FrameMaker.
FrameMaker has excellent support for DITA. You can open DITA topics, and save them (if you wish) as .fm files. You could also open DITAMAPS, and save them as FrameMaker book files, or as composite (monolithic) .fm files. There is no need to write a parser.
PS: I am talking about FM 12.