ProtonMail / WebClients

Monorepo hosting the proton web clients
GNU General Public License v3.0
4.24k stars 538 forks source link

Translations: ProtonDrive, at file details, file type not translated #332

Closed xet7 closed 3 months ago

xet7 commented 1 year ago

We are happy to answer your questions about the code or discuss technical ideas.

Please complete the following checklist (by adding [x]):


Hi, can this file type be made translateable?

proton-drive-zip-archive

olavinto commented 1 year ago

his actually applies to other file types too. For a JPEG image this shows "JPEG images" (in plural form, like a file type category name). If these are to be added, there should be separate strings like { var } archive and { var } image etc. with a variable for the file type name/extension. Or perhaps the extension is not required here at all since it is under this field in the "MIME type" field anyway?

xet7 commented 1 year ago

@olavinto

Or perhaps the extension is not required here at all since it is under this field in the "MIME type" field anyway?

No, the most important info needs to be there.

Some MIME types are really long and complex.

olavinto commented 1 year ago

Yeah, but those are special files that do not really concern basic users. All common archive or image types etc. are pretty much equally simple. And a user who is not able to read "jpeg" (or whatever) from the MIME type probably doesn't know what JPEG means in the fild type field either (the only understand that it's an image file). Also file extensions are shown so those also specify this (something Windows doesn't do as default - a huge reason why "file extension" is a foreign concept for many).

xet7 commented 1 year ago

@olavinto

I really need info in file type, is it PNG image or SVG image. Those require different software for editing. Critical info should not be removed.

olavinto commented 1 year ago

Both have MIME types and it's right next to the type field anyway. image/svg+xml image/png

There's also the question of where the information comes from. Is it detected by actually reading a file's content or is it simply based on its extension in which case the field should simply be file extension (and the extension is also included in the file name, right above these fields, twice if screen space allows, once on smaller screens plus the MIME type)?

But still, I have nothing against the information being there. It's just a tad repetitive.

xet7 commented 1 year ago

@olavinto

In Linux can be run some command like file something.jpg that looks actual file content, so even when there is not correct file extension, it shows correct file type.

I would presume, that because Protonmail runs in browser, there is some similar Javascript npm package that detects file type, and shows it at browser. I don't know that are those text translatable at all, are they only part of that package.

Sure, after detecting file type, there could run some function that detects from result text, is there word like image that could be translated to Finnish.

I also don't know is there some Javascript NPM package where file types are already translated.

pbondoer commented 5 months ago

This was done in dc485b8023fdcdb2b7a87da006603af1dd2eb1bf, thank you for spotting this :sparkles: