pnpm.io icon indicating copy to clipboard operation
pnpm.io copied to clipboard

Format commands as code

Open alexander-mart opened this issue 4 years ago • 7 comments

For simplify translation process, for example this

alexander-mart avatar Apr 18 '21 20:04 alexander-mart

I am not sure about this because it changes the way it is rendered.

zkochan avatar Apr 22 '21 17:04 zkochan

maybe we could capitalize instead.

what do you think @pnpm/collaborators ?

# --filter=PACKAGE_NAME

zkochan avatar Apr 22 '21 17:04 zkochan

capitalizing is good by me

shellscape avatar Apr 22 '21 17:04 shellscape

These aren’t code, though. They should be marked up using <kbd> with <var> inside it for the parts that change.

EDIT: I don’t think the version numbers should be marked up as either.

Aankhen avatar Apr 22 '21 21:04 Aankhen

Looks like this with <kbd>:

image

I think it is fine just to remove the < and >. Even capitalizing is not required.

zkochan avatar Apr 23 '21 00:04 zkochan

I can’t comment on what what be most useful for the translation, but to format this correctly you’d need to use <kbd> and <var> together:

<kbd>--filter <var>package_name</var></kbd>

Which would give you:

--filter package_name

I can understand if that’s a lot to repeat for every instance.

Aankhen avatar Apr 23 '21 00:04 Aankhen

@GreenRobot777 How do these changes simplify the translation process?


@Aankhen just now introduced me to <kbd> and <var> and it seems to be a very good way to use semantic HTML to give proper meaning. I think this would help people using assistive technology (like screenreaders).

As for how much work it would be to implement: I feel that the work can be reduced by having a template that the translators copy, paste, and edit. But I've never really done translating work so I can't say for sure.


I don’t the version numbers should be marked up as either.

I agree with this.

nikoladev avatar Apr 23 '21 08:04 nikoladev