Project

General

Profile

« Previous | Next » 

Revision bd588eb9

Added by koszko over 1 year ago

add missing english translations and verify message texts of raised exceptions in tests

View differences:

src/hydrilla/builder/local_apt.py
114 114
        try:
115 115
            cp = run(command, **kwargs)
116 116
        except FileNotFoundError:
117
            raise AptError(_('couldnt_execute_apt_get_is_it_installed'))
117
            msg = _('couldnt_execute_{}_is_it_installed').format('apt-get')
118
            raise AptError(msg)
118 119

  
119 120
        if cp.returncode != 0:
120
            msg = _('apt_get_command_{}_failed').format(' '.join(command))
121
            msg = _('command_{}_failed').format(' '.join(command))
121 122
            raise AptError(msg, cp)
122 123

  
123 124
        return cp
......
185 186
    try:
186 187
        from gnupg import GPG
187 188
    except ModuleNotFoundError:
188
        raise GpgError(_('couldnt_import_gnupg_is_it_installed'))
189
        raise GpgError(_('couldnt_import_{}_is_it_installed').format('gnupg'))
189 190

  
190 191
    gpg = GPG(keyring=str(cache_dir() / 'master_keyring.gpg'))
191 192
    for key in keys:
......
193 194
            continue
194 195

  
195 196
        if gpg.recv_keys(default_keyserver, key).imported == 0:
196
            raise GpgError(_('gpg_couldnt_recv_key'))
197
            raise GpgError(_('gpg_couldnt_recv_key_{}').format(key))
197 198

  
198 199
    return gpg.export_keys(keys, armor=False, minimal=True)
199 200

  
......
404 405
            try:
405 406
                cp = run(command)
406 407
            except FileNotFoundError:
407
                raise AptError(_('couldnt_execute_dpkg_deb_is_it_installed'))
408
                msg = _('couldnt_execute_{}_is_it_installed'.format('dpkg-deb'))
409
                raise AptError(msg)
408 410

  
409 411
            if cp.returncode != 0:
410
                msg = _('dpkg_deb_command_{}_failed').format(' '.join(command))
412
                msg = _('command_{}_failed').format(' '.join(command))
411 413
                raise AptError(msg, cp)
412 414

  
413 415
        docs_dir = root / 'usr' / 'share' / 'doc'

Also available in: Unified diff