Conversation
|
This is a huge set of changes, can you describe what it does? It changes both localisations and logic and presentation and build, are these changes all related to one feature? |
There was a problem hiding this comment.
The config can't be merged as-is. Don't change the default URL, mode, name, or color.
There was a problem hiding this comment.
@vykliuk, yeah, revert your changes to the config file in this branch/PR, and just keep them locally.
There was a problem hiding this comment.
This was apparently entirely inadvertent. I've reverted it at @vykliuk's request.
It's for Paradigm Dictionary mode: |
| fs.writeFileSync(INDEX_FILE, content); | ||
| } | ||
|
|
||
| generateRegistry(); |
There was a problem hiding this comment.
This seems to auto-create an index.ts which refers to all the files in langs, but if I read it correctly, the generated file will just contain something like
import Dictionary from './Dictionary';
import { spaPlugin } from './langs/spa';
import { uumPlugin } from './langs/uum';
import { LanguagePlugin } from './types';
export const languageRegistry: Record<string, LanguagePlugin> = {
"spa": spaPlugin,
"uum": uumPlugin,
};
export default Dictionary;
I understand that this build step is here to avoid having to remember to do
+import { tatPlugin } from './langs/tat';
…
+ "tat": tatPlugin,on adding Tatar etc., but OTOH it adds some complexity to the build. Do we expect lots of langs?
(Does the regular localisation code also do this kind of thing?)
There was a problem hiding this comment.
I think eventually we expect support for this to be available for lots of languages, yes.
On the other hand, it's not hard to list them all. I did ask @vykliuk explicitly to add this feature (compiling the list automatically), as it makes everything language-specific contained in that one folder. But I'm not super committed to keeping it—as you point out, it's not hard to add the language to this list.
|
I haven't looked very deeply into the react code, @sushain97 knows that better, but I think from just reading it, it looks good to me, the new stuff seems pretty self-contained. I would prefer squashing into one commit for the Dictionary stuff and one for the fairly unrelated src/strings updates – or just not including the src/strings updates if they're just from running |
No description provided.