yari icon indicating copy to clipboard operation
yari copied to clipboard

Fix: localization dashboard on Windows

Open SphinxKnight opened this issue 3 years ago • 3 comments

Summary

This fixes the localization dashboard on Windows by correctly converting the separator used in the slug into the corresponding filesystem separator.

Problem

The localization dashboard (ex. http://localhost:3000/fr/_translations/dashboard?section=/Web/JavaScript ) was not working on Windows and displayed progress bars in an undefined state.

Solution

Fix calls to document.findAll() to make sure the folderSearch was a folder path as expected on the OS filesystem.

N.B.

How did you test this change?

Ran it locally on a Windows (and on a Linux) machine (ex. opening http://localhost:3000/fr/_translations/dashboard?section=/Web/CSS after a yarn dev)

cc @mdn/localization-team-leads

SphinxKnight avatar Oct 07 '22 19:10 SphinxKnight

Before: image

After: image

SphinxKnight avatar Oct 08 '22 05:10 SphinxKnight

I tested on OSX and works fine

Graywolf9 avatar Oct 10 '22 19:10 Graywolf9

I'm not a windows user, but nice to see it works on it, @SphinxKnight thanks!

JuanVqz avatar Oct 10 '22 20:10 JuanVqz

Thanks @SphinxKnight! 🎉

caugner avatar Oct 19 '22 17:10 caugner