The business side before the tech: Translation memories (TMs) – i.e. the collection of bits of text from product and service components with the matching translations in one or more foreign languages – are a generally underused resource outside of the process of creating “stuff” or services. Small and medium size companies/institutions often get translation work done but have no concept of the generic usefulness of the TMs they paid good money for. Even larger companies often come up short. While the latter may put great effort into developing terminology lists, for example for auto parts, translation memories often sit on a server at the vendors. In IT, tech support employees who work in more than one language probably would love to have access to TMs.
If you want to make .tmx files available to people outside of translation/localization related functions or organizational units, several options exist.
Two common ones are exporting a tmx to a spreadsheet and making this available to a wider user audience. Cloud translation platforms can offer APIs you can use to pull a tmx and present to a larger audience.
Some spreadsheet exports, such as the SDL Trados export, include information you do not really need for a viewer, so you have to either hide it or make users accept the format as is. You may no use a cloud platform, or not have a version with an API or enough API calls.
But there are other use cases not so neatly defined, for example, you may have many tmx files living in source control and face organization policies strictly limiting access to a version control system. You may have a disparate mix of tools and processes, or simply a database team unwilling to help you out by putting tmx content into a database for viewing by a wider audience.
The TmxViewer web application described in this post is a simple Java web application that allows users to upload tmx files to a server directory for viewing – with very limited editing – by anyone who has access to the web application.
The basic features are:
- Users can upload single or multiple tmx files through a file upload form.
- When a user accesses the upload page for the first time, he or she is also given a list of tmx files already on the server. Simply clicking a link loads the tmx.
- The value of the parameter “edit” in web.xml controls whether users can edit a tmx.
By default, the value is “true”, allowing both viewing and editing. Change it to “false” to restrict use to viewing only.
- If enabled, clicking on a table cell of the html page makes the cell editable. Moving the cursor out of the editable area causes the browser to send the change to the server. There, it is saved in a new file with the name “output.tmx”.
A binary .war file as well as a Netbeans source project are available on http://www.unchartedcharters.com/
Example of a home page with a list of existing uploaded tmx files:
Latest version of 8/15/3016:
The latest version has its own “Search” box. If a term is found in the tmx, the display will only show matching items. In the screenshot below using a random tmx from the web, the search found one record. Found records can also be edited.
The edit feature is now active by default.
Limitations of the viewer:
The viewer/editor does not offer a global replace feature. The description on the website notes that there is no mechanism for “concurrent” editing. More than one user can, however, work on the single “output.tmx” file. As a workaround, rename the tmx you want to work on to “output.tmx”, then perform any edits. Users will have to refresh their view every now and then (the viewer does not notify) in order to see everybody’s changes.
For use as a “viewer only”, modify the source project by either removing the “onclick” event for table cells or by adding a flag to the code that allows different instances of the web app to surface viewing only or viewing plus editing.
Tag protection is not available in the current version. It would need to be added to make it a serious production editor.
Correct display of right-to-left languages (Arabic, Hebrew) depends solely on existing direction information within each tmx “seg” element.
[Update 8/9/2016] Sample screenshots with one line explanations.
[Update 8/15/2016] Sample screenshots with Search & Edit feature. Added “business side” blurb, changed title accordingly.