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

2.1.12 Still many untranslated strings in the CP #992

Closed
ebeauchamps opened this Issue Sep 26, 2016 · 9 comments

Comments

Projects
None yet
4 participants
@ebeauchamps

ebeauchamps commented Sep 26, 2016

Expected behavior

The CP in the language of my client

Actual behavior

Still a lot of US English throughout the CP

Examples

CONFIGURE (in the sidebar)
Search for anything... (top of the CP)
Show URLs / Show Titles (in the Pages menu)
Edit / Delete / Create Page / Mount Collection (actions on the right of Pages and Collections screens)
...

@jackmcdade

This comment has been minimized.

Member

jackmcdade commented Sep 27, 2016

There are lot of new language variables. Search for anything is cp.search_for_anything, cp.create_page_button is the Create Page button... Can you confirm you're using them in your translation? I can't find any of these missing.

@ebeauchamps

This comment has been minimized.

ebeauchamps commented Sep 27, 2016

These strings are present, you are right, but are not fetched from my translated files.

cp.search_for_anything was put in the language file long ago but we only get the English wording.

@jackmcdade

This comment has been minimized.

Member

jackmcdade commented Sep 27, 2016

@ebeauchamps

This comment has been minimized.

ebeauchamps commented Sep 27, 2016

As I reported back when 2.0.0 went out, you could have fully translated files in your own locale folder, but the CP was only translated at about 50%. It's clearly getting better, but some strings are missing.

The CONFIGURE submenu in the sidebar was included not long ago in the cp file, but It is still untranslated despite being present in my own language file. Yet, all other submenus are now translated! Why is this one untranslated, I don't quite understand.

@jackmcdade

This comment has been minimized.

Member

jackmcdade commented Sep 27, 2016

Fixed for next release.

@ebeauchamps

This comment has been minimized.

ebeauchamps commented Sep 27, 2016

Nice, very nice! Thanks.

@jackmcdade

This comment has been minimized.

Member

jackmcdade commented Sep 27, 2016

@ebeauchamps

Why is this one untranslated, I don't quite understand.

The reason is, it's really hard. There are 10s of thousands of lines of code to paw through to find text strings in javascript, php, html, server callbacks, ajax responses, api calls, blade templates.... We're so close. Thanks for being patient :)

@jasonvarga jasonvarga closed this Oct 6, 2016

@patrikkernke

This comment has been minimized.

patrikkernke commented Oct 13, 2016

Hello Jackmcdade,
I have the same problem here. Tried to translate the whole control panel in german. 95% are okay, but there are problems with dynamic translations in vue like

// File: statamic/resources/views/pages.blade.php
// Row 12-40
...

<div class="controls">

    <div class="btn-group" v-if="arePages">
        <button type="button" class="btn btn-default" v-on:click="expandAll">

            {{ translate('cp.expand') }} // OKAY TRANSLATED

        </button>
        <button type="button" class="btn btn-default" v-on:click="collapseAll">

            {{ translate('cp.collapse') }} // OKAY TRANSLATED

        </button>
        <button type="button" class="btn btn-default" v-on:click="toggleUrls" 

            v-text="translate('cp.show_'+show)" >
            // NOT OKAY, IS NOT TRANSLATED (DYNAMIC PARAMETER)
            // The translation string exists in english and german: cp.show_url 
            // and cp.show_titles. But it returns only the default english.

        </button>
    </div>

    @can('pages:create')
        <div class="btn-group">
            <button type="button" class="btn btn-primary" @click="createPage('/')">

                {{ translate('cp.create_page_button') }} // OKAY TRANSLATED

            </button>
       </div>
   @endcan

   @can('pages:reorder')
       <div class="btn-group" v-if="arePages && changed">
           <button type="button" class="btn btn-secondary" v-if="! saving" @click="save">

               {{ translate('cp.save_changes') }} // OKAY TRANSLATED

           </button>
           <span class="btn btn-primary btn-has-icon-right disabled" v-if="saving">

               {{ translate('cp.saving') }} // OKAY TRANSLATED
               <i class="icon icon-circular-graph animation-spin"></i>

           </span>
       </div>
  @endcan

</div>

...

The same happens in the file statamic/resources/views/settings/edit.blade.php

// Row 5-11

<div class="tabs">
        @foreach ($settings as $setting)
            <a href="{{ route('settings.edit', $setting) }}" class="{{ $setting !== $slug ?: 'active' }}">

                 {{ translate('cp.settings_'.$setting) }}
                 // NOT WORKING, DYNAMIC PARAMETER

            </a>
        @endforeach
</div>

I appreciate your hard work! Thanks in advanced. I am testing Statamic and wish I could use it in my projects. But the translation thing is a crucial thing for my clients ...

@ebeauchamps

This comment has been minimized.

ebeauchamps commented Oct 27, 2016

Patrick, try adding locale: de to site/settings/cp.yaml
#1068

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