4 ms·
I would recommend against one's own XML format and doubly against CSV/some homegrown delimited format. Instead, consider something like Excel 2003 XML (one of t
by eropple 9y ago
I would recommend against one's own XML format and doubly against CSV/some homegrown delimited format. Instead, consider something like Excel 2003 XML (one of the easier ones), OpenDocument (also pretty easy in many languages), or Office OpenXML (easy in .NET, a bit harder elsewhere) to store your translation data.
Potfiles are another option, but the tooling is pretty clunky and, in games in particular, people don't seem particularly attuned to their use. And they're not great for editing, though they might be for storage--when dealing with tabular stuff, it just makes a lot of sense to use tools that present a tabular interface. It makes life a lot easier.
- microcolonel 9y agoIf it's literally a table of strings, why on earth would anyone use ODF/OOXML? CSV is perfectly fine for editing in any functioning spreadsheet software, works reasonably well in version control (especially since a given commit won't touch multiple columns). In his case, he's using the XML format which Haxe will parse into compile-time-checked references right in his source code; sounds like a great reason to use this standardized(but Haxe-specific) XML format.
- et1337 9y agoCSV has no formatting. Who wants to resize columns and set up text wrapping every time you open the file. Could save it as .xlsx and then export to CSV, but that's another step and it's not hard to parse simple spreadsheets in XML. Worth it in my book, because it enables fan translators to contribute easily since everyone has Excel.
- douche 9y agoDon t use Excel to edit csvs. It makes a hash of things at best, and frigs things up at worst.
- eropple 9y agoIt's not about you, though. Or me. It's about what the people working with you are most comfortable with. I can go blurf out JSON or XML or potfiles by hand, whatever. But normal people are going to go "er, no?" and even if you win that argument you've lost social capital on something that didn't really matter.
- mikesickler 9y agoyeah I don't see any reason not to use that XML format. CSV can be problematic because it doesn't declare it's own encoding and doesn't play as nice with translation tools as something with named fields, such as XML or JSON.
- eropple 9y ago> CSV is perfectly fine for editing in any functioning spreadsheet software This smacks of the Linux user who adjusts his pince-nez and talks about "legacy operating systems". Excel is functioning spreadsheet software by near-universal acclaim (to the point where there's a pretty decent argument that everything that isn't 100% Excel compatible isn't, it practically defines the medium when speaking to nontrivial spreadsheet users!), no matter how much you want to well-actually about it. And it's the one that pretty much everyone in this space uses. You might not like that, and I'm not a big fan of it either, but reality is notable for not really caring about whether we like it.
- slavik81 9y agoI really don't like how you're putting words in his mouth. He said nothing to suggest that he felt Excel was inadequate for editing CSVs. That's your opinion. And, it's not exactly streamlined, but it's good enough that Microsoft will suggest using it for that purpose. https://support.office.com/en-us/article/Create-or-edit-csv-files-to-import-into-Outlook-4518d70d-8fe9-46ad-94fa-1494247193c7 https://support.office.com/en-us/article/Create-or-edit-csv-...
- eropple 9y agoI misread the author - thought it was someone who'd been posting elsewhere in the thread about Excel (which does have CSV issues for days). Mea maxima culpa.
- kccqzy 9y agoCan you explain why you oppose CSV? And by the way CSV is a standardized format with its own RFC; it is definitely not home grown. There are mature parsers being able to handle commas and quotes and linebreaks and other special characters in CSVs.
- echlebek 9y agoThat's adorable! CSV is notoriously loose, has a bajillion edge cases, differs wildly on region, and is not even really a format at all. Basically nobody follows RFC 4180, nor does anyone care about its existence. The other day I had to fix a bug in our CSV importer; it turns out that when you install Excel, it changes the mimetype of CSV files from 'text/csv' to 'application/vnd-ms.excel' system wide. Wow! These sorts of shenanigans are never ending in the futile endeavour to support CSV.
- douche 9y agoInstalling excel does heinous things. I try to keep my csvs opening in notepad++ to avoid corruption
- eropple 9y agoYour translator/localizer, if you have one, probably uses Excel already. I personally prefer to have fewer moving parts in my stack, so I don't really think it makes much sense to make their life harder just to have something else.
- metaobject 9y agoIt seems that you're letting the behavior of a particular application and OS negatively affect your opinion of a technology which works really well on different platforms.
- benchaney 9y agoThat seems like a serious issue with excel. I don't really see how that is an problem with CSV as a format.
- deleted 9y ago
- douche 9y agoThat seems like some serious overkill, unless you are relying on your translators to produce production assets. We have used json, xml, ini-style files, or csvs, which, as i8n goes, has been pretty easy
- eropple 9y agoIf you're not relying on your translators to produce production assets, then you will be converting them from a format they are comfortable with (which tends towards Excel, if not a web app of some flavor) into whatever you're using. Unless you have a particularly rough memory budget, you will almost certainly be saving yourself time and effort by cutting out a step.
- mercer 9y agoIf you use a web app of some flavor (AirTable, Google Sheets), conversion shouldn't be a problem though, should it? Or are there good reasons to avoid these options that I'm not thinking of?
- eropple 9y agoIt's another step you have to automate in your build pipeline, have to tag and manage outside of source control (making your builds now "code at rev X + assets of difficult-to-isolate revision Y", which makes repeatability a little harder), and so on and so forth. You can do it, and it has its advantages. But you're also buying complexity.
- petepete 9y agoJust do what the industry does and use XLIFF[0] Professional translators will already use compatible editors and for occasional translators there are open source ones available. [0] https://en.m.wikipedia.org/wiki/XLIFF https://en.m.wikipedia.org/wiki/XLIFF
- eropple 9y agoBlah, how did I forget XLIFF? Unlike a lot of OASIS specs I think it seems pretty reasonable and alright, but I've never actually seen it implemented anywhere (games or general startup-y web stuff). I'm glad you brought it up, though, because it did slip my mind. =)
- petepete 9y agoUntil starting my own company earlier this year, I worked in the translation industry. We had some XLIFF-friendly clients who, on the whole, had been used to translating and localising their data for a long time and were productive and well-organised. The remainder of our clients weren't; a mixture of spreadsheets, CSVs, home-baked XML/JSON/YAML were most common. We could accommodate these providing the format was documented and we had technically competent translators for that language with the correct industry-specific knowledge. Finally, some clients insisted on sending us PDFs, marketing materials (hopefully in PSD files but sometimes in PNG or TIFF). They couldn't understand why we had to go to great lengths to find translators who could cope and why sometimes the results weren't pixel-perfect. Of course, supplying the source materials to us to pass on to translators was out of the question. Fun times.