From: Felix B. <bf...@gm...> - 2006-07-20 18:24:38
|
On Thursday 20 July 2006 18:34, Anna Talis (atalis) wrote: > A project I'm working on has an existing, not internationalized > codebase. We are going to use Gettext Commons in the upcoming release. > All the new code is supposed to have tr* wrappers in it, but we'll still > need to deal with the existing code. Nice. If it's a public project, could we maybe point to it as an example of how the Gettext Commons are deployed? > We need to get a list of unwrapped strings so that we could go through > the code (automatically or manually) and wrapp those strings. If you wrap the strings manually, you don't need to extract the unwrapped ones beforehand. After you wrapped them with i18n.tr, they can be extracted by xgettext. Am I missing something? > I see > that one can extract either all strings (-a option) or tr*-wrapped > strings (-k*** options). But is there a way to extract all strings > *except* those wrapped into the tr* methods? You could use a couple of regular expressions, or extract all strings with xgettext and then extract only the tr() wrapped ones and subtract the latter set of strings from the first one. Or maybe you have a point in time in the history of your source control system when only unwrapped strings existed? > Also, do you know of any tools that would help us to wrap unwrapped > strings automatically? We still have plans of writing an Eclipse plug-in for this purpose. It would make use of the Java Parser of Eclipse to detect the strings and refactor the code properly, similar to what "Externalize Strings" does for Eclipse's way of i18nizing. Felix -- Try Debian GNU/Linux! http://www.felix.beldesign.de/ |