Re: [PATCH 1 of 1] Refer to “remote repository” and “clone” consistently in templates

Thomas De Schampheleire patrickdepinguin at gmail.com
Thu May 28 02:38:37 EDT 2015


On Thu, May 28, 2015 at 2:08 AM, Mads Kiilerich <mads at kiilerich.com> wrote:
> # HG changeset patch
> # User Ben Finney <ben at benfinney.id.au>
> # Date 1429660546 -36000
> #      Wed Apr 22 09:55:46 2015 +1000
> # Node ID 80d0f17ab57f146c0c316d9dcd83d01ebdad72f1
> # Parent  2c1ae0b188ae5f5fde6369f76803a1170592b90d
> Refer to “remote repository” and “clone” consistently in templates.
>
> diff --git a/kallithea/templates/admin/repos/repo_add_base.html b/kallithea/templates/admin/repos/repo_add_base.html
> --- a/kallithea/templates/admin/repos/repo_add_base.html
> +++ b/kallithea/templates/admin/repos/repo_add_base.html
> @@ -13,7 +13,7 @@
>                  <div style="margin: 6px 0px 0px 0px">
>                      <a id="remote_clone_toggle" href="#">
>                          <i class="icon-download-cloud"></i>
> -                        ${_('Import existing repository ?')}
> +                        ${_('Clone from an existing repository?')}

In fact, I wonder if it is useful to have this link in the first
place. Why not always show the 'remote repository' input field? Its
help text clearly indicates that the field is optional and what it
does.

>                      </a>
>                  </div>
>                  %if not c.authuser.is_admin:
> @@ -23,12 +23,12 @@
>           </div>
>          <div id="remote_clone" class="field" style="display: none">
>              <div class="label">
> -                <label for="clone_uri">${_('Clone from')}:</label>
> +                <label for="clone_uri">${_('Clone from remote repo')}:</label>

I find it odd to see 'repo' references in user-visible text, and would
prefer to refer to 'repository' in all places. So this would become:

Clone from remote repository

or, to keep the label somewhat shorter, what about simply:

Remote repository



>              </div>
>              <div class="input">
>                  ${h.text('clone_uri',class_="small")}
>                  <span class="help-block">
> -                    ${_('Optional URL from which repository should be cloned.')}
> +                    ${_('Optional URL of remote repository. If set, this repository will be cloned from remote.')}

How about (for the second sentence)

.... If set, this repository will be cloned from the specified remote location.

>                  </span>
>              </div>
>          </div>
> diff --git a/kallithea/templates/admin/repos/repo_edit_remote.html b/kallithea/templates/admin/repos/repo_edit_remote.html
> --- a/kallithea/templates/admin/repos/repo_edit_remote.html
> +++ b/kallithea/templates/admin/repos/repo_edit_remote.html
> @@ -1,19 +1,19 @@
>  %if c.repo_info.clone_uri:
>  <div style="font-size: 20px; padding: 0px 0px 10px 0px">
> -   ${_('Remote URL')}: <a href="${c.repo_info.clone_uri}">${c.repo_info.clone_uri_hidden}</a></li>
> +   ${_('Remote repo URL')}: <a href="${c.repo_info.clone_uri}">${c.repo_info.clone_uri_hidden}</a></li>

I would change the label to either of:

Remote repository (in symmetry with the create page)
Remote repository URL

>  </div>
>  ${h.form(url('edit_repo_remote', repo_name=c.repo_name), method='put')}
>  <div class="form">
>      <div class="fields">
>          ${h.submit('remote_pull_%s' % c.repo_info.repo_name,
> -            _('Pull Changes from Remote Location'),
> +            _('Pull Changes from Remote Repo'),

Repository

>              class_="btn btn-small",
> -            onclick="return confirm('"+_('Confirm to pull changes from remote side.')+"');")}
> +            onclick="return confirm('"+_('Confirm to pull changes from remote repository.')+"');")}
>      </div>
>  </div>
>  ${h.end_form()}
>  %else:
>    <div style="font-size: 20px">
> -    ${_('This repository does not have a remote URL set.')}
> +    ${_('This repository does not have a remote repository URL.')}

What about:
This repository does not have a remote repository set.
This repository does not have a remote repository URL set.
No remote repository has been configured for this repository.


>    </div>
>  %endif
> diff --git a/kallithea/templates/admin/repos/repo_edit_settings.html b/kallithea/templates/admin/repos/repo_edit_settings.html
> --- a/kallithea/templates/admin/repos/repo_edit_settings.html
> +++ b/kallithea/templates/admin/repos/repo_edit_settings.html
> @@ -35,7 +35,7 @@
>                      ${h.hidden('clone_uri_change', 'NEW')}
>                    %endif
>                    <span id="alter_clone_uri_help_block" class="help-block">
> -                      ${_('URL used for doing remote pulls.')}
> +                      ${_('Remote repository URL to pull from.')}
>                    </span>
>                  </div>
>              </div>

On this edit repo page, I would also change the label 'Clone URL' into

Remote repository

in symmetry with the create repo page.

Best regards,
Thomas


More information about the kallithea-general mailing list