Skip to content

Conversation

@mdo
Copy link
Member

@mdo mdo commented Jan 15, 2018

Adds a live docs example for a Spanish translation for the custom file input to test out #23612. The CSS for this isn't included in v4 by default—instead, it's in our docs CSS. In my testing, the translation works as intended. Similarly, setting a custom lang attribute on the <input> doesn't break the English default from our source Sass (meaning any additional languages from the $custom-file-text Sass map will function correctly).

This should close #23612 without any actual fix being implemented.

@andresgalante
Copy link
Collaborator

@mdo I've patched it because even though the spanish was correct, it wasn't what I'd expect from a file typed file.

@mdo mdo mentioned this pull request Jan 15, 2018
@XhmikosR XhmikosR merged commit fa3de5c into v4-dev Jan 15, 2018
@XhmikosR XhmikosR deleted the improve-custom-file-lang-docs branch January 15, 2018 07:19
@mdo
Copy link
Member Author

mdo commented Jan 15, 2018

Thank you, @andresgalante!

$custom-file-text: (
en: "Browse",
es: "Navegar"
es: "Elegir"
Copy link

Choose a reason for hiding this comment

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

“Browse” is usually translated as Examinar (see, e.g., Microsoft Terminology)

Copy link
Member Author

Choose a reason for hiding this comment

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

Please open a new issue :).

{% example html %}
<div class="custom-file">
<input type="file" class="custom-file-input" id="customFileLang" lang="es">
<label class="custom-file-label" for="customFileLang">Seleccionar Archivo</label>
Copy link

Choose a reason for hiding this comment

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

This should be Seleccionar un archivo because: 1) some browsers use the treatment and others use usted; the infinitive is neutral in that sense; and 2) Title Case is not used in Spanish.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants