Changeset 737eb6c in OpenWorkouts-current


Ignore:
Timestamp:
Feb 26, 2019, 5:13:49 PM (5 years ago)
Author:
Borja Lopez <borja@…>
Branches:
current, feature/docs, master
Children:
723588b
Parents:
1c54633
Message:

Fixed missing translations for submit buttons all over the place.

Location:
ow
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • ow/locale/OpenWorkouts.pot

    r1c54633 r737eb6c  
    77msgstr ""
    88"Project-Id-Version: PACKAGE 1.0\n"
    9 "POT-Creation-Date: 2019-02-25 13:14+0100\n"
     9"POT-Creation-Date: 2019-02-26 17:08+0100\n"
    1010"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1111"Last-Translator: FULL NAME <EMAIL@ADDRESS\n"
     
    3333msgstr ""
    3434
     35#: ./ow/utilities.py:309
     36msgid "English"
     37msgstr ""
     38
     39#: ./ow/utilities.py:310
     40msgid "Spanish"
     41msgstr ""
     42
    3543#: ./ow/mail.py:42 ./ow/templates/mail_verify_account_txt.pt:5
    3644msgid "Welcome to OpenWorkouts"
     
    4149msgstr ""
    4250
    43 #: ./ow/schemas/user.py:12
     51#: ./ow/schemas/user.py:13
    4452msgid "The given password does not match the existing one "
    4553msgstr ""
    4654
    47 #: ./ow/schemas/user.py:24
     55#: ./ow/schemas/user.py:25
    4856msgid "Another user is already using the nickname %(name)s"
    4957msgstr ""
    5058
    51 #: ./ow/schemas/user.py:36
     59#: ./ow/schemas/user.py:37
    5260msgid "Another user is already registered with the email %(email)s"
    5361msgstr ""
     
    147155msgstr ""
    148156
     157#: ./ow/templates/add_manual_workout.pt:187 ./ow/templates/add_workout.pt:93
     158#: ./ow/templates/edit_profile.pt:255
     159#: ./ow/templates/update_workout_from_file.pt:139
     160msgid "Save"
     161msgstr ""
     162
    149163#: ./ow/templates/add_user.pt:11 ./ow/templates/add_user.pt:15
    150164msgid "Add user"
     
    214228
    215229#: ./ow/templates/change_password.pt:11 ./ow/templates/change_password.pt:15
    216 #: ./ow/templates/change_password.pt:24
     230#: ./ow/templates/change_password.pt:24 ./ow/templates/change_password.pt:109
    217231msgid "Change password"
    218232msgstr ""
     
    301315#: ./ow/templates/update_workout_from_file.pt:48
    302316msgid "Duration:"
     317msgstr ""
     318
     319#: ./ow/templates/delete_workout.pt:55
     320msgid "Are you sure you want to delete this workout?"
     321msgstr ""
     322
     323#: ./ow/templates/delete_workout.pt:58
     324msgid "Yes, delete"
    303325msgstr ""
    304326
     
    322344msgstr ""
    323345
    324 #: ./ow/templates/edit_profile.pt:49
     346#: ./ow/templates/edit_profile.pt:48
    325347msgid "Current picture:"
    326348msgstr ""
    327349
    328 #: ./ow/templates/edit_profile.pt:57
     350#: ./ow/templates/edit_profile.pt:56
    329351msgid "Picture (jpg, jpeg, png or gif):"
    330352msgstr ""
    331353
    332 #: ./ow/templates/edit_profile.pt:65
     354#: ./ow/templates/edit_profile.pt:64
    333355msgid "First name:"
    334356msgstr ""
    335357
    336 #: ./ow/templates/edit_profile.pt:70
     358#: ./ow/templates/edit_profile.pt:69
    337359msgid "Last name:"
    338360msgstr ""
    339361
    340 #: ./ow/templates/edit_profile.pt:75 ./ow/templates/profile.pt:165
     362#: ./ow/templates/edit_profile.pt:74 ./ow/templates/profile.pt:165
    341363msgid "Gender:"
    342364msgstr ""
    343365
    344 #: ./ow/templates/edit_profile.pt:83 ./ow/templates/profile.pt:169
     366#: ./ow/templates/edit_profile.pt:82 ./ow/templates/profile.pt:169
    345367msgid "Birth date:"
    346368msgstr ""
    347369
    348 #: ./ow/templates/edit_profile.pt:88
     370#: ./ow/templates/edit_profile.pt:87
    349371msgid "Height (meters):"
    350372msgstr ""
    351373
    352 #: ./ow/templates/edit_profile.pt:93
     374#: ./ow/templates/edit_profile.pt:92
    353375msgid "Weight (kg):"
    354376msgstr ""
    355377
    356 #: ./ow/templates/edit_profile.pt:99
     378#: ./ow/templates/edit_profile.pt:98
    357379msgid "Bio/About you:"
    358380msgstr ""
     
    362384msgstr ""
    363385
    364 #: ./ow/templates/edit_profile.pt:105
     386#: ./ow/templates/edit_profile.pt:106
    365387msgid "All dates and times will be formatted for this timezone"
     388msgstr ""
     389
     390#: ./ow/templates/edit_profile.pt:114
     391msgid "Language:"
     392msgstr ""
     393
     394#: ./ow/templates/edit_profile.pt:116
     395msgid "All texts in the user interface will appear in this language"
    366396msgstr ""
    367397
     
    384414#: ./ow/templates/login.pt:40
    385415msgid "Your password..."
     416msgstr ""
     417
     418#: ./ow/templates/login.pt:44 ./ow/templates/verify.pt:21
     419msgid "Login"
    386420msgstr ""
    387421
     
    490524msgstr ""
    491525
     526#: ./ow/templates/signup.pt:64
     527msgid "Sign up!"
     528msgstr ""
     529
    492530#: ./ow/templates/update_workout_from_file.pt:11
    493531#: ./ow/templates/update_workout_from_file.pt:16
     
    590628msgstr ""
    591629
    592 #: ./ow/templates/verify.pt:21
    593 msgid "Login"
    594 msgstr ""
    595 
    596630#: ./ow/templates/mail_verify_account_html.pt:17
    597631msgid "Welcome"
     
    616650msgstr ""
    617651
    618 #: ./ow/views/user.py:55
     652#: ./ow/views/user.py:59
    619653msgid "User has been verified already"
    620654msgstr ""
    621655
    622 #: ./ow/views/user.py:56
     656#: ./ow/views/user.py:60
    623657msgid "Verification link sent, please check your inbox"
    624658msgstr ""
    625659
    626 #: ./ow/views/user.py:57
     660#: ./ow/views/user.py:61
    627661msgid "We already sent you the verification link more than three times"
    628662msgstr ""
    629663
    630 #: ./ow/views/user.py:82
     664#: ./ow/views/user.py:96
    631665msgid "Wrong password"
    632666msgstr ""
    633667
    634 #: ./ow/views/user.py:84
     668#: ./ow/views/user.py:98
    635669msgid "You have to verify your account first"
    636670msgstr ""
    637671
    638 #: ./ow/views/user.py:89
     672#: ./ow/views/user.py:103
    639673msgid "Wrong email address"
    640674msgstr ""
  • ow/locale/es/LC_MESSAGES/OpenWorkouts.po

    r1c54633 r737eb6c  
    77msgstr ""
    88"Project-Id-Version: PACKAGE 1.0\n"
    9 "POT-Creation-Date: 2019-02-25 13:14+0100\n"
    10 "PO-Revision-Date: 2019-02-25 13:24+0100\n"
     9"POT-Creation-Date: 2019-02-26 17:08+0100\n"
     10"PO-Revision-Date: 2019-02-26 17:09+0100\n"
    1111"Last-Translator: Wu <info@openworkouts.org>\n"
    1212"Language-Team: Spanish\n"
     
    3434msgstr "Noche"
    3535
     36#: ow/utilities.py:309
     37msgid "English"
     38msgstr "Inglés"
     39
     40#: ow/utilities.py:310
     41msgid "Spanish"
     42msgstr "Español"
     43
    3644#: ow/mail.py:42 ow/templates/mail_verify_account_txt.pt:5
    3745msgid "Welcome to OpenWorkouts"
     
    4250msgstr "Por favor, adjunta un fichero válido."
    4351
    44 #: ow/schemas/user.py:12
     52#: ow/schemas/user.py:13
    4553msgid "The given password does not match the existing one "
    4654msgstr "La clave no coincide"
    4755
    48 #: ow/schemas/user.py:24
     56#: ow/schemas/user.py:25
    4957msgid "Another user is already using the nickname %(name)s"
    5058msgstr "Otro usuario está usando el apodo %(name)s"
    5159
    52 #: ow/schemas/user.py:36
     60#: ow/schemas/user.py:37
    5361msgid "Another user is already registered with the email %(email)s"
    5462msgstr "Otro usuario ya está registrado con el email %(email)s"
     
    131139#: ow/templates/add_manual_workout.pt:58
    132140msgid "Start date (dd/mm/yyyy)"
    133 msgstr "Fecha de inicio (dd/mm/yyyy)"
     141msgstr "Fecha (dd/mm/yyyy)"
    134142
    135143#: ow/templates/add_manual_workout.pt:63
    136144msgid "Start time (HH:MM)"
    137 msgstr "Hora de inicio (HH:MM)"
     145msgstr "Hora (HH:MM)"
    138146
    139147#: ow/templates/add_manual_workout.pt:71
     
    152160msgid "Notes:"
    153161msgstr "Notas:"
     162
     163#: ow/templates/add_manual_workout.pt:187 ow/templates/add_workout.pt:93
     164#: ow/templates/edit_profile.pt:255
     165#: ow/templates/update_workout_from_file.pt:139
     166msgid "Save"
     167msgstr "Guardar"
    154168
    155169#: ow/templates/add_user.pt:11 ow/templates/add_user.pt:15
     
    185199#: ow/templates/add_workout.pt:23
    186200msgid "Upload workout file"
    187 msgstr "Subir fichero del entreno"
     201msgstr "Subir fichero (gpx, fit)"
    188202
    189203#: ow/templates/add_workout.pt:34
     
    220234
    221235#: ow/templates/change_password.pt:11 ow/templates/change_password.pt:15
    222 #: ow/templates/change_password.pt:24
     236#: ow/templates/change_password.pt:24 ow/templates/change_password.pt:109
    223237msgid "Change password"
    224238msgstr "Cambiar clave de acceso"
     
    308322msgid "Duration:"
    309323msgstr "Duración:"
     324
     325#: ow/templates/delete_workout.pt:55
     326msgid "Are you sure you want to delete this workout?"
     327msgstr "Quieres eliminar este entreno?"
     328
     329#: ow/templates/delete_workout.pt:58
     330msgid "Yes, delete"
     331msgstr "Sí, eliminar"
    310332
    311333#: ow/templates/edit_manual_workout.pt:16
     
    328350msgstr "Apodo:"
    329351
    330 #: ow/templates/edit_profile.pt:49
     352#: ow/templates/edit_profile.pt:48
    331353msgid "Current picture:"
    332354msgstr "Foto actual:"
    333355
    334 #: ow/templates/edit_profile.pt:57
     356#: ow/templates/edit_profile.pt:56
    335357msgid "Picture (jpg, jpeg, png or gif):"
    336358msgstr "Foto (jpg, jpeg, png o gif):"
    337359
    338 #: ow/templates/edit_profile.pt:65
     360#: ow/templates/edit_profile.pt:64
    339361msgid "First name:"
    340362msgstr "Nombre:"
    341363
    342 #: ow/templates/edit_profile.pt:70
     364#: ow/templates/edit_profile.pt:69
    343365msgid "Last name:"
    344366msgstr "Apellidos:"
    345367
    346 #: ow/templates/edit_profile.pt:75 ow/templates/profile.pt:165
     368#: ow/templates/edit_profile.pt:74 ow/templates/profile.pt:165
    347369msgid "Gender:"
    348370msgstr "Género:"
    349371
    350 #: ow/templates/edit_profile.pt:83 ow/templates/profile.pt:169
     372#: ow/templates/edit_profile.pt:82 ow/templates/profile.pt:169
    351373msgid "Birth date:"
    352374msgstr "Fecha de nacimiento:"
    353375
    354 #: ow/templates/edit_profile.pt:88
     376#: ow/templates/edit_profile.pt:87
    355377msgid "Height (meters):"
    356378msgstr "Altura (metros):"
    357379
    358 #: ow/templates/edit_profile.pt:93
     380#: ow/templates/edit_profile.pt:92
    359381msgid "Weight (kg):"
    360382msgstr "Peso (kg):"
    361383
    362 #: ow/templates/edit_profile.pt:99
     384#: ow/templates/edit_profile.pt:98
    363385msgid "Bio/About you:"
    364386msgstr "Bio/Acerca de ti:"
     
    368390msgstr "Zona horaria:"
    369391
    370 #: ow/templates/edit_profile.pt:105
     392#: ow/templates/edit_profile.pt:106
    371393msgid "All dates and times will be formatted for this timezone"
    372394msgstr "Todas las fechas serán formateadas para esta zona horaria"
     395
     396#: ow/templates/edit_profile.pt:114
     397msgid "Language:"
     398msgstr "Idioma:"
     399
     400#: ow/templates/edit_profile.pt:116
     401msgid "All texts in the user interface will appear in this language"
     402msgstr "Todos los textos de la interfaz aparecerán en este idioma"
    373403
    374404#: ow/templates/login.pt:27
     
    391421msgid "Your password..."
    392422msgstr "Tu clave..."
     423
     424#: ow/templates/login.pt:44 ow/templates/verify.pt:21
     425msgid "Login"
     426msgstr "Inicia sesión"
    393427
    394428#: ow/templates/login.pt:46
     
    462496#: ow/templates/signup.pt:22
    463497msgid "We need a valid email address"
    464 msgstr "Necesitamos una dirección de correo electrónico válida"
     498msgstr "Tu dirección de correo electrónico"
    465499
    466500#: ow/templates/signup.pt:30
     
    495529msgid "Confirm your password"
    496530msgstr "Vuelve a escribir tu clave"
     531
     532#: ow/templates/signup.pt:64
     533msgid "Sign up!"
     534msgstr "Registrarme!"
    497535
    498536#: ow/templates/update_workout_from_file.pt:11
     
    607645"de verificación."
    608646
    609 #: ow/templates/verify.pt:21
    610 msgid "Login"
    611 msgstr "Inicia sesión"
    612 
    613647#: ow/templates/mail_verify_account_html.pt:17
    614648msgid "Welcome"
     
    635669"y pegarlo en la barra de navegación de tu navegador web:"
    636670
    637 #: ow/views/user.py:55
     671#: ow/views/user.py:59
    638672msgid "User has been verified already"
    639673msgstr "La cuenta ya ha sido verificada"
    640674
    641 #: ow/views/user.py:56
     675#: ow/views/user.py:60
    642676msgid "Verification link sent, please check your inbox"
    643677msgstr ""
     
    646680"buzón de correo electrónico"
    647681
    648 #: ow/views/user.py:57
     682#: ow/views/user.py:61
    649683msgid "We already sent you the verification link more than three times"
    650684msgstr "Ya te hemos enviado el enlace de verificación más de tres veces"
    651685
    652 #: ow/views/user.py:82
     686#: ow/views/user.py:96
    653687msgid "Wrong password"
    654688msgstr "Clave incorrecta"
    655689
    656 #: ow/views/user.py:84
     690#: ow/views/user.py:98
    657691msgid "You have to verify your account first"
    658692msgstr "Tienes que verificar tu cuenta primero"
    659693
    660 #: ow/views/user.py:89
     694#: ow/views/user.py:103
    661695msgid "Wrong email address"
    662696msgstr "Dirección de correo electrónico incorrecta"
  • ow/template_helpers.py

    r1c54633 r737eb6c  
    11from pyramid.events import subscriber, BeforeRender
     2from pyramid.i18n import TranslationStringFactory, get_localizer
    23
    34from ow.utilities import timedelta_to_hms
     5
     6_ = TranslationStringFactory('OpenWorkouts')
    47
    58
     
    710def add_renderer_globals(event):  # pragma: no cover
    811    event['timedelta_to_hms'] = timedelta_to_hms
     12    event['_'] = _
     13    event['get_localizer'] = get_localizer
  • ow/templates/add_manual_workout.pt

    r1c54633 r737eb6c  
    8989            ${form.textarea('notes', rows=10, cols=50)}
    9090          </div>
    91       </fieldset>
     91        </fieldset>
    9292
    93         ${form.submit("submit", "Save",  **{'class':"button button-normal"})}
     93        <tal:with-localizer tal:define="localizer get_localizer(request)">
     94          ${form.submit("submit", localizer.translate(_('Save')),  **{'class':"button button-normal"})}
     95        </tal:with-localizer>
    9496
    9597      ${form.end()}
  • ow/templates/add_workout.pt

    r1c54633 r737eb6c  
    3737          </p>
    3838          <p>
    39               <label for="tracking_file" i18n:translate="">
    40                   Workout file (gpx, fit)</label>
    41               ${form.errorlist('tracking_file')}
    42               ${form.file('tracking_file')}
     39            <label for="tracking_file" i18n:translate="">
     40              Workout file (gpx, fit)</label>
     41            ${form.errorlist('tracking_file')}
     42            ${form.file('tracking_file')}
    4343          </p>
    4444        </fieldset>
    4545
    46         ${form.submit("submit", "Save",  **{'class':"button button-normal"})}
     46        <tal:with-localizer tal:define="localizer get_localizer(request)">
     47          ${form.submit("submit", localizer.translate(_('Save')),  **{'class':"button button-normal"})}
     48        </tal:with-localizer>
    4749
    4850      ${form.end()}
  • ow/templates/change_password.pt

    r1c54633 r737eb6c  
    5252
    5353          <p>
    54               ${form.submit("submit", "Change password",  **{'class':"button button-normal"})}
    55 
     54            <tal:with-localizer tal:define="localizer get_localizer(request)">
     55              ${form.submit("submit", localizer.translate(_('Change password')),  **{'class':"button button-normal"})}
     56            </tal:with-localizer>
    5657          </p>
    5758          ${form.end()}
  • ow/templates/delete_workout.pt

    r1c54633 r737eb6c  
    5353
    5454      <div>
    55         <p>Are you sure you want to delete this workout?</p>
     55        <p i18n:translate="">Are you sure you want to delete this workout?</p>
    5656      </div>
    5757      <div>
    58         <input class="button button-normal" type="submit" name="submit" value="Yes, delete" />
     58        <input class="button button-normal" type="submit" name="submit" value="Yes, delete"
     59               i18n:attributes="value" />
    5960      </div>
    6061      </form>
  • ow/templates/edit_profile.pt

    r1c54633 r737eb6c  
    125125
    126126        <p>
    127             ${form.submit("submit", "Save",  **{'class':"button button-normal"})}
     127          <tal:with-localizer tal:define="localizer get_localizer(request)">
     128            ${form.submit("submit", localizer.translate(_('Save')),  **{'class':"button button-normal"})}
     129          </tal:with-localizer>
    128130        </p>
    129131        ${form.end()}
  • ow/templates/login.pt

    r1c54633 r737eb6c  
    4242            </div>
    4343            <div>
    44               <input class="button button-action" type="submit" name="submit" value="Login">
     44              <input class="button button-action" type="submit" name="submit" value="Login" i18n:attributes="value">
    4545            </div>
    4646            <a class="login-remember" href="#" i18n:translate="">
  • ow/templates/signup.pt

    r1c54633 r737eb6c  
    6262          </fieldset>
    6363
    64           <input class="button button-action" type="submit" name="submit" value="Sign up!">
     64          <input class="button button-action" type="submit" name="submit" value="Sign up!"
     65                 i18n:attributes="value">
    6566
    6667        </form>
  • ow/templates/update_workout_from_file.pt

    r1c54633 r737eb6c  
    2121    <div id="update_workout_file" class="ow-forms">
    2222
    23       <a class="back" href="" tal:attributes="href request.resource_url(request.root)"
     23      <a class="back" href="" tal:attributes="href request.resource_url(context)"
    2424         i18n:translate="">Back</a>
    2525
     
    6767      </fieldset>
    6868
    69       ${form.submit("submit", "Save",  **{'class':"button button-normal"})}
     69      <tal:with-localizer tal:define="localizer get_localizer(request)">
     70        ${form.submit("submit", localizer.translate(_('Save')),  **{'class':"button button-normal"})}
     71      </tal:with-localizer>
     72
    7073      ${form.end()}
    7174    </div>
  • ow/tests/views/test_user.py

    r1c54633 r737eb6c  
    6868        user = john
    6969        request = DummyRequest()
     70        request.registry.settings = {
     71            'pyramid.default_locale_name': 'en'
     72        }
    7073        request.root = root
    7174        request.method = 'POST'
Note: See TracChangeset for help on using the changeset viewer.