mintyfrankie / brilliant-CV-Submodule

Apache License 2.0
17 stars 16 forks source link

Pr/sw language #9

Closed HernandoR closed 1 year ago

HernandoR commented 1 year ago

introduced a varVersion to split the duties of the language switch and version switch.

Detailed usage is in the Readme file.

Basically, varVersion is for switch between folder of modules, varlanguage is for the different content.

languageSwtich() would be used too many times, consider make a shorter name.

mintyfrankie commented 1 year ago

Thanks for the PR here. Just let you know that this brings another breaking change on the existing project, for which I will be extremely prudent.

Is your intention to be able to use languageSwitch outside template.typ, and to decouple it with varLangauge by abstracting it to a varVersion? Can you provide more use case of why we will want to use the notion of version switch instead of language switch?

HernandoR commented 1 year ago

Hi,

Yes, it is indented to use languageSwich outside template.typ

Current varVersion is for controlling the module* folder to use. During the usage, I feel it is too decoupled to split different languages into different folders, it's frustrating to compare two files and make them syncing in different languages.

I therefore consider different folder should be abstract as different versions, such as a one page resume side by a more detailed one, or different types of jobs require different emphasis. You can, of course, consider different languages as different version, such that there will be barely any breaking change but varLanguage rename to varVersionin the metadata.typ

I can commit an example to show how to use (or not) this feature, though it is a composite change in both the example repo and template repo. Let me know if you would like me to submit PR individually or include the template in the example.

mintyfrankie commented 1 year ago

I see. The original method has indeed its pros and cons, and while squeezing information of all languages into a single file, you lose readability and structure. I think making a single page version will be an edge case here, as the functionality is intended to manage and switch languages, instead of "versions" (as the current user base perceives).

I will tend to not impose this breaking change for now, but I will leave this open to see how others feel about it and if further update in Typst can resolve this conflict in a more elegant way.