zendesk-helpcenter-export icon indicating copy to clipboard operation
zendesk-helpcenter-export copied to clipboard

Export in different locales

Open pjmuller opened this issue 10 years ago • 7 comments

Kevin Østerkilde asked if it was possible to export in different locales. This is doable, however I need some more information to get it right (because we are only using one locale)

My question is quite simple. I've seen that the SAME articles have different locales. However is this also the case for categories and sections? If so we could only have one directory structure and keep different files on the level of the articles. Else we would need different file structures.

In every case can you already try the branch https://github.com/pjmuller/zendesk-helpcenter-export/tree/added_locale_support I tried to implement the second way with different directory hierarchies. but maybe still has some errors.

pjmuller avatar Mar 14 '16 08:03 pjmuller

Hi Pieterjan,

I can indeed confirm that both categories and sections use the same ID's as well, just like articles. I'll give your branch a go and report back in a few minutes.

Kosai106 avatar Mar 14 '16 08:03 Kosai106

Hi again,

I'm back with good news - The script functions beautifully! It exports from each locale just as expected. So far I've only found one issue: It doesn't categorize the items correctly in the root index.html file, as evident below:

issue2

Everything is sorted under the DA locale, despite being Swedish, English or any other language.

Kosai106 avatar Mar 14 '16 08:03 Kosai106

Hi @pjmuller,

So it's time for my monthly backup and that got me wondering if you've had time to look at my feedback? No rush of course. One thing I just noticed is that it seems to export in the correct order, so it's only the html file which is being put together wrong.

However, I'm currently in the process of expanding my skillset, which means Ruby is next up, so maybe in time I'll be able to fix this myself if you don't have time for it yourself.

Cheers. :)

Kosai106 avatar Apr 11 '16 08:04 Kosai106

Hi Kevin ,

no sorry, did not have the time yet. The problem is however here https://github.com/pjmuller/zendesk-helpcenter-export/blob/added_locale_support/zendesk-helpcenter-export.rb#L96

As we only add the article to the big raw_data hash once. We should do this multiple times.

Maybe you can indeed pick up some ruby skills and submit a pull request. Would be awesome :)

pjmuller avatar Apr 13 '16 05:04 pjmuller

Hi PJ,

It would be a good learning experience for sure. I'll let you know how it goes.

Kosai106 avatar Apr 14 '16 16:04 Kosai106

Hi,

At first, thanks for your work!

I faced an issue on unix because of FileUtils require instruction for this branch. I proposed a PR about this.

I'll try to take a look at @Kosai106 index issue, and maybe propose an option to generate only one locale for example.

Thanks again.

gjariot avatar Sep 21 '16 09:09 gjariot

Pull request #15 proposes a fix for @Kosai106 issue. However, it changes the meta_data.json file structure. Backward compatibility is then no longer kept, but I'm not sure whether you're using it or not.

Hope it'll help. It helped us at least :)

gjariot avatar Sep 27 '16 08:09 gjariot