lucasnevespereira / resumme-builder

Resume builder in Golang using json data and html templates
MIT License
15 stars 6 forks source link

Add stackoverflow theme #5

Closed francois07 closed 3 months ago

francois07 commented 3 months ago

This adds the well-known stackoverflow theme

lucasnevespereira commented 3 months ago

Hello @francois07

This looks great! It's a very nice template, thank you for your contribution.

Just a couple of things to ensure your template works without issues:

  1. Locale Update:

    • You've added a CertificatesLabel to fr.json. Please add the same label to en.json as well.
  2. Model Update:

    • In internal/models/resume.go, update the ResumeLabels struct to include Certificates, ensuring it is injected into the template correctly.
    • Create a function to get the label in the correct language.
    type ResumeLabels struct {
       ...
       Certificates string
    }
    func (r *Resume) GetCertificatesLabel() string {
      return lang.Translate(r.Meta.Lang, CertificatesLabel)
    }
  3. Parser Update

    • In pkg/parser/html.go, prepare the label to be injected in the updateResumeLabels function.
     ...
     resumeData.Labels.Certificates = resumeData.GetCertificatesLabel()

    Let me know if that works for you. I can also merge and provide the updates myself if you prefer. Thanks again for your contribution!

francois07 commented 3 months ago

Hello @lucasnevespereira, thank you for the feedback ! As requested, I updated en.json, internal/models/resume.go and pkg/parser/html.go. I also added support for multiple source date formats in formatDate().

francois07 commented 3 months ago

I just noticed an issue with localization : Go does not localize dates natively. This could be done using an external dependency such as https://github.com/goodsign/monday/

This would require some changes to i18n though, which is outside of this PR's scope. I'm open to try to investigate further once this PR is accepted.

lucasnevespereira commented 3 months ago

I just noticed an issue with localization : Go does not localize dates natively. This could be done using an external dependency such as https://github.com/goodsign/monday/

This would require some changes to i18n though, which is outside of this PR's scope. I'm open to try to investigate further once this PR is accepted.

Hello @francois07, thanks for noticing that, feel free to open an issue (or I can do it later) I could assign you to it, if you feel like working on that