Get slug from problem list for a new option of filename in English.#725
Get slug from problem list for a new option of filename in English.#725assumecs wants to merge 1 commit intoLeetCode-OpenSource:masterfrom
Conversation
| return node.id; | ||
| case "name": | ||
| return node.name; | ||
| case "slug": |
There was a problem hiding this comment.
I guess we need to think for a better name of this new placeholder, slug is not straightforward to me at least...
There was a problem hiding this comment.
You got me...
I don't know what slug means in problem list.
Maybe name_en?
There was a problem hiding this comment.
I found this What is a “slug” in Django:it is created from the title by down-casing all letters, and replacing spaces by hyphens-.
It's not easy to find a word to replace "slug", "short-label"?"kebab-case-title"? or just "slug"?
There was a problem hiding this comment.
Hmm, I like the idea to provide English name as the file name. But there is one problem: people might ask 'Ok, we have the slug styled name, so what about the camel case/pascal case/snake case'?
I think (maybe) a better solution here is having a setting to specify whether to use translated name as the file name, and then, we can provide different style option to the user(kebab, snake, pascal, ...)?
Depends on Provide an English filename when using Endpoint Translation
This might be a better way than #724