Conversation
This is related to issue #564
|
🎉 Beta deployment successful!: view the changes in live preview environment: https://gridbeta-github.asterics-foundation.org/alexangelov14/-564-translation-on-element-level/pr |
Since it was related to translation decided to add the solution to this problem here. This is a referance to which problem im referencing since it didnt have linked issue number: Problem: Currently, to "get" all content of a grid set one has to go to 'translate grid', choose the 'show all grids' from the first dropdown and then use the 'copy column' option to get the words.
|
🎉 Beta deployment successful!: view the changes in live preview environment: https://gridbeta-github.asterics-foundation.org/alexangelov14/-564-translation-on-element-level/pr |
|
🎉 Beta deployment successful!: view the changes in live preview environment: https://gridbeta-github.asterics-foundation.org/alexangelov14/-564-translation-on-element-level/pr |
|
🎉 Beta deployment successful!: view the changes in live preview environment: https://gridbeta-github.asterics-foundation.org/alexangelov14/-564-translation-on-element-level/pr |
|
🎉 Beta deployment successful!: view the changes in live preview environment: https://gridbeta-github.asterics-foundation.org/alexangelov14/-564-translation-on-element-level/pr |
|
🎉 Beta deployment successful!: view the changes in live preview environment: https://gridbeta-github.asterics-foundation.org/alexangelov14/-564-translation-on-element-level/pr |
1 similar comment
|
🎉 Beta deployment successful!: view the changes in live preview environment: https://gridbeta-github.asterics-foundation.org/alexangelov14/-564-translation-on-element-level/pr |
Since we moved the translation to the "General" tab its pointless to keep it.
|
🎉 Beta deployment successful!: view the changes in live preview environment: https://gridbeta-github.asterics-foundation.org/alexangelov14/-564-translation-on-element-level/pr |
|
@klues for some reason it doesnt reflect on the new changes when it builds the pr. Any ideas what may be the case for that? EDIT: there wasnt any issue. It happened to be a caching problem on my side. |
…ation Switched the position of the accordions "Advanced options" and "Translation". Also in the "Translation" accordion made it so that when there is no other language used by the user to default to the first one in the all languages list.
|
🎉 Beta deployment successful!: view the changes in live preview environment: https://gridbeta-github.asterics-foundation.org/alexangelov14/-564-translation-on-element-level/pr |
|
🎉 Beta deployment successful!: view the changes in live preview environment: https://gridbeta-github.asterics-foundation.org/alexangelov14/-564-translation-on-element-level/pr |
klues
left a comment
There was a problem hiding this comment.
Thanks for your work! 👍
Please look at my comments.
app/lang/i18n.de.json
Outdated
| "clone": "Duplizieren", | ||
| "export": "Exportieren", | ||
| "exportElementLabels": "Element-Beschriftungen exportieren", | ||
| "exportLabelsDescription": "Exportieren Sie alle Element-Beschriftungen aus Ihren Grids als einfache Textdatei. Dies ist nützlich, um einen Überblick über Ihr Vokabular zu erhalten oder für externe Verarbeitung.", |
There was a problem hiding this comment.
has nothing to do with the current issue/PR, has it? It's an interesting idea, but do you have any user request regarding this feature? All regarding this exportLabels functionality should be removed from this PR and added/discussed in another issue/PR.
There was a problem hiding this comment.
there shouldn't be any changes to languages files except i18n.en.json - all other languages are managed via crowdin.
| getLabelPlaceholder(locale) { | ||
| // If LIVE element, show special placeholder | ||
| if (this.gridElement.type === GridElement.ELEMENT_TYPE_LIVE) { | ||
| return i18nService.t('canIncludePlaceholderLike'); |
There was a problem hiding this comment.
probably needs some adaption in i18nService.t() to not pass params?! I don't know.
There was a problem hiding this comment.
this is still broken. For live elements the placeholder should tell the user that the text can include a placeholder like {0}, now it only says text (Spanish) or similar. Go to "new special element -> Live element" to see it.
I would use just (Spanish) for the normal placeholders not text (Spanish), but probably a thing of personal preference.
| return i18nService.t('canIncludePlaceholderLike'); | ||
| } | ||
|
|
||
| // If label exists in requested locale, no placeholder needed |
There was a problem hiding this comment.
can be removed - if there is a value, we don't see the placeholder
| } | ||
|
|
||
| // Find first available label in another language | ||
| let availableLangs = Object.keys(this.gridElement.label).filter(lang => this.gridElement.label[lang]); |
There was a problem hiding this comment.
can also be removed, see comment in issue. Basically just always show Text ([current content lang])
| } | ||
| }, | ||
| mounted() { | ||
| // Ensure gridElement has proper label and pronunciation structure |
There was a problem hiding this comment.
hmm, I don't think we really need this - I think we can trust that label and pronunciation is an object here. See GridElement.DEFAULTS in GridElement.js
| margin-top: 1em; | ||
| } | ||
|
|
||
| .input-button { |
There was a problem hiding this comment.
gridTranslateModal.vue has a very similar CSS rule for the pronunciation play button. please unify and add it to some common CSS like custom.css or even better: extract the input field + play button to an extra component and use it here twice and in translate modal once.
| pointer-events: auto; | ||
| } | ||
|
|
||
| .checkbox-label-small { |
There was a problem hiding this comment.
the select for the languages + show all languages checkbox should also be moved to an extra component and used everywhere, to prevent doing the same things (like computing currently shown languages etc.) at so many places.
But only do it if you want - since it's probably some work to do it everywhere...
There was a problem hiding this comment.
as said in other comment - should be included in this PR - is a separate issue / PR
| padding: 0 1em; | ||
| box-shadow: none; | ||
| background-color: transparent; | ||
| cursor: pointer; |
There was a problem hiding this comment.
aren't these default values for buttons? so I don't understand why we need these changes.
|
🎉 Beta deployment successful!: view the changes in live preview environment: https://gridbeta-github.asterics-foundation.org/alexangelov14/-564-translation-on-element-level/pr |
|
@klues can you check if i havent missed something from the comments. The stuff regarding the export labels was requested by ms-mialingvo from what i remember. It was talked somewhere in the comments of the issue itself, if im not wrong. https://gridbeta-github.asterics-foundation.org/alexangelov14/-564-translation-on-element-level/pr |
|
@klues can you check the last changes whenever possible? |
|
@klues could you please check out the latest changes and give me some feedback if needed? |
app/lang/i18n.en.json
Outdated
| "clone": "Clone", | ||
| "export": "Export", | ||
| "exportElementLabels": "Export element labels", | ||
| "exportLabelsDescription": "Export all element labels from your grids as a simple text file. This is useful for getting an overview of your vocabulary or for external processing.", |
There was a problem hiding this comment.
please remove all new labels which are not related to the current issue.
| <div class="row"> | ||
| <label class="col-sm-2" for="inputLabel">{{ $t('label') }}</label> | ||
| <div class="col-sm-7"> | ||
| <input type="text" class="col-12" id="inputLabel" v-focus @keydown.enter.exact="$emit('searchImage')" v-if="gridElement" v-model="gridElement.label[currentLang]" :placeholder="gridElement.type === GridElement.ELEMENT_TYPE_LIVE ? $t('canIncludePlaceholderLike') : ''"/> |
There was a problem hiding this comment.
here you removed the logic for the special placeholder if it's a live element - should be included in "getLabelPlaceholder()"
| let langName = this.getLocaleTranslation(locale); | ||
| return `${i18nService.t('text')} (${langName})`; | ||
| }, | ||
| getPronunciationPlaceholder(locale) { |
There was a problem hiding this comment.
seems like this method is never used
| let label = this.gridElement.label[locale] || ''; | ||
| let langName = this.getLocaleTranslation(locale); | ||
| if (label) { | ||
| return `${langName} pronunciation of "${label}"`; |
| if (label) { | ||
| return `${langName} pronunciation of "${label}"`; | ||
| } | ||
| return `${langName} pronunciation`; |
| return `${langName} pronunciation`; | ||
| }, | ||
| getLocaleTranslation(locale) { | ||
| return i18nService.getTranslationAppLang(this.allLanguages.filter((lang) => lang.code === locale)[0]); |
|
Hi, I've added another review with some new comments. There are also many comments from my previous review, which were not adressed. In addition to changing something in the code, please also reply to all of my comments (also "ok, done" is helpful) - so it's easier for me to see what you have done or changed. |
|
🎉 Beta deployment successful!: view the changes in live preview environment: https://gridbeta-github.asterics-foundation.org/alexangelov14/-564-translation-on-element-level/pr |
|
@klues went through all of the comments from Dec 18th and the new ones today. All the things should be addressed from my understanding. Nothing should've been missed. The only thing skipped is the part for "the select for the languages + show all languages checkbox" which was optional for now. Seems kinda pointless at this point to go through all of the comments and say the I've done them since thats what I'm saying here in this one. Will keep it in mind for other tasks/issues tho. https://gridbeta-github.asterics-foundation.org/alexangelov14/-564-translation-on-element-level/pr |


This is related to issue #564