~ubuntu-branches/ubuntu/wily/grass/wily

« back to all changes in this revision

Viewing changes to general/g.access/exp_perms.c

Tags: 7.0.0~rc1+ds1-1~exp1
* New upstream release candidate.
* Repack upstream tarball, remove precompiled Python objects.
* Add upstream metadata.
* Update gbp.conf and Vcs-Git URL to use the experimental branch.
* Update watch file for GRASS 7.0.
* Drop build dependencies for Tcl/Tk, add build dependencies:
  python-numpy, libnetcdf-dev, netcdf-bin, libblas-dev, liblapack-dev
* Update Vcs-Browser URL to use cgit instead of gitweb.
* Update paths to use grass70.
* Add configure options: --with-netcdf, --with-blas, --with-lapack,
  remove --with-tcltk-includes.
* Update patches for GRASS 7.
* Update copyright file, changes:
  - Update copyright years
  - Group files by license
  - Remove unused license sections
* Add patches for various typos.
* Fix desktop file with patch instead of d/rules.
* Use minimal dh rules.
* Bump Standards-Version to 3.9.6, no changes.
* Use dpkg-maintscript-helper to replace directories with symlinks.
  (closes: #776349)
* Update my email to use @debian.org address.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#include <grass/gis.h>
 
2
#include <grass/glocale.h>
 
3
 
2
4
char *explain_perms(int group, int other, int will)
3
5
{
4
 
    static char buf[128];
 
6
    static char buf[256];
5
7
    char *who;
6
8
    char *verb;
7
9
    char *read;
8
10
 
9
 
    verb = "have";
10
 
    read = "read ";
 
11
    verb = _("have");
 
12
    read = _("read ");
11
13
    read = "";                  /* remove this to have "read" appear */
12
14
    if (group && other) {
13
 
        who = "Everyone";
14
 
        verb = "has";
 
15
        who = _("Everyone");
 
16
        verb = _("has");
15
17
    }
16
18
    else if (group) {
17
 
        who = "Only users in your group";
 
19
        who = _("Only users in your group");
18
20
    }
19
21
    else if (other) {
20
 
        who = "Only users outside your group";
 
22
        who = _("Only users outside your group");
21
23
    }
22
24
    else {
23
 
        who = "Only you";
 
25
        who = _("Only you");
24
26
        read = "";
25
27
    }
26
28
    if (will)
27
 
        verb = "have";
 
29
        verb = _("have");
28
30
 
29
 
    sprintf(buf, "%s %s %s %saccess to mapset %s",
30
 
            who, will ? "will" : "now", verb, read, G_mapset());
 
31
    sprintf(buf, _("%s %s %s %saccess to mapset %s"),
 
32
            who, will ? _("will") : _("now"), verb, read, G_mapset());
31
33
    return buf;
32
34
}