Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translations for decodeJwt function #25

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Translations for decodeJwt function #25

wants to merge 1 commit into from

Conversation

baltpeter
Copy link
Member

@baltpeter baltpeter commented Sep 9, 2024

In preparation for: tweaselORG/TrackHAR#81

This can be merged before the changes in TrackHAR are released.

Comment on lines +68 to +69
"one": "Decode {{ .input }} as a JSON Web Token (JWT).",
"other": "Decode every element in {{ .mapInput }} as a JSON Web Token (JWT)."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"one": "Decode {{ .input }} as a JSON Web Token (JWT).",
"other": "Decode every element in {{ .mapInput }} as a JSON Web Token (JWT)."
"one": "Decode {{ .input }} from a JSON Web Token (JWT).",
"other": "Decode every element in {{ .mapInput }} from a JSON Web Token (JWT)."

I am not sure which preposition fits, but ‘as’ feels wrong.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Um, to me "as" sounds fine. "from" is definitely wrong—{{ .input }} is a JWT.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But this is what "from" canonically is supposed to mean, see e.g. https://www.urldecoder.org/

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Setting aside that I wouldn't accept a random website as "canonical" (:P), you decode the output (unencoded message) from [an encoding], not the input (encoded message) as in your suggested phrasing.

Unlike our sentence, your canonical source doesn't have a subject in any sentence where it uses "decode from".

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But in any case, this discussion is not specific to JWT. We are using "as" in all the other decode function translations as well.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think maybe we should remove the prepostions altogether.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh, what would that look like? But I genuinely don't see the issue you have with "as".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants