Tasks-plugin: change task/tasks to the Dutch taak/taken


I would like to know how to change the words task/tasks in the output, to taak/taken.

I have found the bit of code where I need to change it in main.js on line 19079

`${tasksCount} todo${tasksCount !== 1 ? 's' : ''}`,

and as a workaround I now use the words todo/todos - but I don’t like that, I would like it to reflect my own language, Dutch. I want it to read taak/taken.

But since our language has a weird plural system, I cannot get this expression to reflect that.

I have little javascript/json skills, but as you see I can (sometimes) find the string I need to make small changes.

But how do I achieve a plural that differs from just putting an “s” behind it?

Do I need a regex expression or something?

Hope someone can help me out here :slight_smile: - thanks in advance for thinking along!

Things I have tried

What I’m trying to do

1 Like

I am not at a computer right now, but can you try this? Or adapt it. I hope it gets you on the right track.

`${tasksCount} ${tasksCount === 1 ? 'Taak' : 'Taken'}`,

Let me know if you need more help :blush:

1 Like

Thats works beautifully! Thank you :slight_smile:

Would it be an idea to make those two words translatable through the options? I don’t know how hard that would be though.

I would love to help you translate the whole plugin (like where you explain how to do stuff and meaningful words etc) to Dutch, if you explain to me how to do that.

Glad it works!

Thank you for your offer. But it’s not feasible at the moment. I would need to make changes to the entire plugin to support internationalization. Maybe some day. Right now I am focusing more on features/the core of the plugin.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.