Currently if you import content that isn't en-US, then it is imported incorrectly into PressGang. As such the import tool should attempt to get the locale from the publican.cfg "xml_lang" parameter and if it can't get it from there (ie Mojo, DocBook imports) then it should ask the user. Then when the topic/content spec is created it should have the appropriate locale set.
Created attachment 875313 [details] xml_lang test
Fixed in 201403171332 The import tool will default to en-US. This can be overridden with the xml_lang value in the publican.cfg file, and can be manually specified with a Mojo/ODT/generic docbook import.
I was able to import a publican book from a locale that wasn't supported by PressGang (this should probably be complemented with a server side check thinking about it atm). Additionally publican books are going to use locales such as: es-ES ja-JP de-DE however in PressGang we match it to the Zanata locales (we may want to rethink that), as such these should be mapped from the relevant publican locale to the zanata locale. The mapping as I know atm is: PressGang -> Publican ja -> ja-JP es -> es-ES de -> de-DE fr -> fr-FR pt-BR -> pt-BR (unchanged) zh-Hans -> zh-CN it -> it-IT ko -> ko-KR ru -> ru-RU zh-TW -> zh-TW (unchanged) So perhaps what we could do is remove the territory part from the passed locale (ie remove -US from en-US) and check if that matches a supported locale. If it does then ask the user if they want to use that locale. In the case of an unsupported locale I guess the system should just fail the import process.