Skip to content

Commit

Permalink
Merge pull request #591 from c2corg/contributor-disambiguation
Browse files Browse the repository at this point in the history
Disambiguation between contributor and author #590
  • Loading branch information
cbeauchesne authored Apr 21, 2019
2 parents 21788bd + 9bae9ab commit aab69ca
Show file tree
Hide file tree
Showing 13 changed files with 72 additions and 70 deletions.
6 changes: 3 additions & 3 deletions src/components/datatable/DocumentsTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import MarkerCondition from './cell-renderers/MarkerCondition';
import MarkerQuality from './cell-renderers/MarkerQuality';
import AreaList from './cell-renderers/AreaList';
import DocumentAuthor from './cell-renderers/DocumentAuthor';
import DocumentContributor from './cell-renderers/DocumentContributor';
import DocumentActivities from './cell-renderers/DocumentActivities';
function getColDef(vm, field, options) {
Expand Down Expand Up @@ -144,7 +144,7 @@
this.columnDefs = [
getColDef(this, fields.title, { cellRendererFramework: DocumentLink }),
getColDef(this, { name: 'areas' }, { cellRendererFramework: AreaList }),
getColDef(this, { name: 'Author' }, { cellRendererFramework: DocumentAuthor }),
getColDef(this, fields.author),
getColDef(this, fields.filename)
];
}
Expand All @@ -164,7 +164,7 @@
getColDef(this, fields.date_start, { width: 120, cellRendererFramework: OutingDate }),
getColDef(this, fields.title, { cellRendererFramework: DocumentLink }),
getColDef(this, { name: 'areas' }, { cellRendererFramework: AreaList }),
getColDef(this, { name: 'Author' }, { cellRendererFramework: DocumentAuthor, width: 100 }),
getColDef(this, { name: 'contributor' }, { cellRendererFramework: DocumentContributor, width: 100 }),
getColDef(this, fields.activities, { cellRendererFramework: DocumentActivities, width: 100 }),
{
headerName: this.$gettext('elevation'),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<author-link :author="params.data.author" />
<contributor-link :contributor="params.data.author" />
</template>

<script>
Expand Down
16 changes: 0 additions & 16 deletions src/components/generics/links/AuthorLink.vue

This file was deleted.

12 changes: 10 additions & 2 deletions src/components/generics/links/ContributorLink.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
<template>
<span>
<author-link :author="contributor" />
(<router-link :to="{name: 'whatsnew', query: {u:contributor.user_id} }">c</router-link>)
<router-link :to="{name:'profile', params:{id:contributor.user_id}}">
{{ contributor.name }}
</router-link>
<span v-if="showWhatsnew">
(<router-link :to="{name: 'whatsnew', query: {u:contributor.user_id} }">c</router-link>)
</span>
</span>
</template>

Expand All @@ -11,6 +15,10 @@
contributor: {
type: Object,
required: true
},
showWhatsnew: {
type: Boolean,
default: false
}
}
};
Expand Down
49 changes: 32 additions & 17 deletions src/translations/dist/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"access_times": "3h"
},
"3h+": {
"access_times": "3h+"
"access_times": "> 3h"
},
"45min": {
"access_times": "45min"
Expand All @@ -50,11 +50,11 @@
"access_times": "5min"
},
"access": {
"$$noContext": "accès routier / TC",
"waypoint_types": "accès routier / TC"
"$$noContext": "accès routier / transports en commun",
"waypoint_types": "accès routier / transports en commun"
},
"access_comment": "Commentaires sur l'accès routier / TC",
"access_condition": "Conditions de l'accès routier / TC",
"access_comment": "Commentaires sur l'accès routier / transports en commun",
"access_condition": "Conditions de l'accès routier / transports en commun",
"access_period": "Période de déneigement ou d'ouverture",
"access_time": "Temps d'accès",
"accessible_when_wardened": {
Expand Down Expand Up @@ -154,7 +154,7 @@
},
"associations": "Associations",
"at least one route required": {
"API message": "Sélectionnez au moins un participant"
"API message": "Sélectionnez au moins un itinéraire"
},
"at least one user required": {
"API message": "Sélectionnez au moins un itinéraire"
Expand All @@ -164,7 +164,6 @@
"aug": {
"months": "août"
},
"Author": "Auteur",
"author": "Auteur",
"author_status": "Implication dans la situation",
"Automatic": {
Expand All @@ -186,12 +185,16 @@
"avalanche_slope": "Pente de la zone de départ",
"avalanches": "Observations relatives aux avalanches",
"average": {
"condition_ratings": "moyennes"
"condition_ratings": "moyennes",
"snow_quality_ratings": "moyenne",
"snow_quantity_ratings": "moyenne"
},
"Average slope (degrees)": "Pente moyenne (degrés)",
"Average slope in degree": "Pente moyenne en degrés",
"awful": {
"condition_ratings": "exécrables"
"condition_ratings": "exécrables",
"snow_quality_ratings": "exécrable",
"snow_quantity_ratings": "exécrable"
},
"Back to code": "Retour au code",
"Back to edit mode": "Retour en mode édition",
Expand Down Expand Up @@ -338,6 +341,7 @@
"Continue the discussion": "Continuer la discussion",
"Contribute to common knowledge": "Participer à la construction d'un savoir collectif",
"Contributions": "Contributions",
"contributor": "contributeur",
"copyright": {
"image_types": "copyright",
"$$noContext": "copyright"
Expand All @@ -362,7 +366,6 @@
},
"Create a new report": "Créer un nouveau compte-rendu",
"Created on": "Crée le",
"creator": "auteur",
"crevasse_fall": {
"event_types": "chute en crevasse"
},
Expand Down Expand Up @@ -403,7 +406,10 @@
"Describe historical information about the route (date, names..) here": "Précisez ici les informations historiques de l'itinéraire : ouverture du bas ou équipement (du haut), premières ascensions, premières descentes à ski/surf, rééquipements, éboulements, etc. Mentionnez la date, le nom des protagonistes, et le club ou organisme ayant financé le matériel laissé en place.",
"Describe opening hours": "Précisez les heures d'ouverture",
"Describe opening periods": "Précisez les périodes d'ouverture",
"Describe pedestrian access": "Décrire l'accès pédestre",
"Describe pedestrian access": {
"hut": "Décrire l'accès",
"$$noContext": "Décrire l'accès pédestre"
},
"Describe pt access": "Décrire l'accès au point de passage",
"Describe road access": "Décrire l'itinéraire",
"describe route_conditions": "Décrivez brièvement l'itinéraire que vous avez suivi dans les cas suivants : itinéraire différent de celui du topo, topo comportant des variantes, itinéraire en boucle, enchainement, point atteint lors d'un parcours partiel.\nATTENTION: ne téléchargez pas de photos copiées d'un topo ou d'un livre. Les modérateurs les suppriment illico, car c'est une pratique illégale et elle ne respecte pas les licences utilisées par le site.",
Expand Down Expand Up @@ -492,7 +498,9 @@
"event_type": "Type d'évènement",
"Everything about ratings : difficulties, exposition...": "Rentrez ici la totalités des cotations de l'itinéraire (difficulté, exposition, qualité de l'équipement...)",
"excellent": {
"condition_ratings": "excellentes"
"condition_ratings": "excellentes",
"snow_quality_ratings": "excellente",
"snow_quantity_ratings": "excellente"
},
"Expand": "Déplier",
"expedition": {
Expand Down Expand Up @@ -590,7 +598,9 @@
},
"Go to the previous page": "Retourner à la page précédente",
"good": {
"condition_ratings": "bonnes"
"condition_ratings": "bonnes",
"snow_quality_ratings": "bonne",
"snow_quantity_ratings": "bonne"
},
"good service": {
"public_transportation_ratings": "service régulier"
Expand Down Expand Up @@ -827,7 +837,7 @@
"magazine": {
"book_types": "magazine"
},
"Main information about the route, such as title, activity, GPS, and waypoint (which mountain, place).": "Principales informations sur l'itinéraire, comme le nom, les activités, le géo-localisation, et l'environnement proche.",
"Main information about the route, such as title, activity, GPS, and waypoint (which mountain, place).": "Principales informations sur l'itinéraire, comme le nom, les activités, la géo-localisation, et l'environnement proche.",
"Main informations about your outing": "Données principales de votre sortie",
"main_waypoint_id": "ID du point de passage principal",
"Make profile page public": "Rendre publique la page de profil",
Expand Down Expand Up @@ -1069,7 +1079,10 @@
"Password too short": {
"API message": "Le mot de passe est trop court"
},
"pedestrian access": "Accès pédestre",
"pedestrian access": {
"hut": "Accès",
"$$noContext": "Accès pédestre"
},
"people": {
"image_categories": "personnages"
},
Expand Down Expand Up @@ -1108,7 +1121,9 @@
"API message": "Erreur inattendue, merci de contacter dev@camptocamp.org"
},
"poor": {
"condition_ratings": "mauvaises"
"condition_ratings": "mauvaises",
"snow_quality_ratings": "mauvaise",
"snow_quantity_ratings": "mauvaise"
},
"poor service": {
"public_transportation_ratings": "service réduit"
Expand Down Expand Up @@ -1566,7 +1581,7 @@
"$$noContext": "oui"
},
"You can choose to remain anonymous": "Vous pouvez choisir de rester anonyme",
"You may add associated waypoints, books and articles": "Associez d'autres document de camptocamp à ce point de passage",
"You may add associated waypoints, books and articles": "Associez d'autres documents de camptocamp à ce point de passage",
"You may also drag, draw or edit the track on the map.": "Vous pouvez dessiner, éditer ou faire glisser la trace GPS sur la carte."
}
}
33 changes: 15 additions & 18 deletions src/translations/po/c2corg_ui-client.pot
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ msgstr ""
msgid "Articles, waypoints or routes to be linked."
msgstr ""

#: src/views/wiki/edition/ImageEditionView.vue:68
#: src/views/wiki/edition/ImageEditionView.vue:66
msgid "Articles, waypoints, routes or books to be linked."
msgstr ""

Expand Down Expand Up @@ -374,7 +374,7 @@ msgid "association"
msgstr ""

#: src/views/wiki/edition/BookEditionView.vue:37
#: src/views/wiki/edition/ImageEditionView.vue:67
#: src/views/wiki/edition/ImageEditionView.vue:65
#: src/views/wiki/edition/WaypointEditionView.vue:156
msgid "associations"
msgstr ""
Expand Down Expand Up @@ -403,13 +403,7 @@ msgctxt "months"
msgid "aug"
msgstr ""

#: src/views/wiki/HistoryView.vue:45
#: src/views/wiki/WhatsNewView.vue:11
msgid "Author"
msgstr ""

#: src/translations/fixed_strings_common_js.vue:19
#: src/views/document/XreportView.vue:9
msgid "author"
msgstr ""

Expand Down Expand Up @@ -634,7 +628,7 @@ msgctxt "rock_types"
msgid "calcaire"
msgstr ""

#: src/views/wiki/edition/ImageEditionView.vue:46
#: src/views/wiki/edition/ImageEditionView.vue:44
msgid "camera settings"
msgstr ""

Expand Down Expand Up @@ -891,6 +885,13 @@ msgstr ""
msgid "Contributions"
msgstr ""

#: src/views/document/ImageView.vue:17
#: src/views/document/XreportView.vue:9
#: src/views/wiki/HistoryView.vue:45
#: src/views/wiki/WhatsNewView.vue:11
msgid "contributor"
msgstr ""

#: src/translations/fixed_strings_common_js.vue:394
msgctxt "image_types"
msgid "copyright"
Expand Down Expand Up @@ -938,10 +939,6 @@ msgstr ""
msgid "Created on"
msgstr ""

#: src/views/document/ImageView.vue:17
msgid "creator"
msgstr ""

#: src/translations/fixed_strings_common_js.vue:341
msgctxt "event_types"
msgid "crevasse_fall"
Expand Down Expand Up @@ -1113,7 +1110,7 @@ msgstr ""
msgid "Detailed figures, like ratings, height differences, frequentation..."
msgstr ""

#: src/views/wiki/edition/ImageEditionView.vue:58
#: src/views/wiki/edition/ImageEditionView.vue:56
msgid "Detailed information"
msgstr ""

Expand Down Expand Up @@ -1559,7 +1556,7 @@ msgstr ""
msgid "Geolocation"
msgstr ""

#: src/views/wiki/edition/ImageEditionView.vue:35
#: src/views/wiki/edition/ImageEditionView.vue:33
msgid "geolocation"
msgstr ""

Expand Down Expand Up @@ -2764,7 +2761,7 @@ msgstr ""
msgid "Open fields to deeply explain the event circumstances."
msgstr ""

#: src/views/wiki/edition/ImageEditionView.vue:59
#: src/views/wiki/edition/ImageEditionView.vue:57
msgid "Open fields to detail the picture's context"
msgstr ""

Expand Down Expand Up @@ -2876,7 +2873,7 @@ msgctxt "waypoint_types"
msgid "paragliding_takeoff"
msgstr ""

#: src/views/wiki/edition/ImageEditionView.vue:47
#: src/views/wiki/edition/ImageEditionView.vue:45
msgid "Parameters of the Digital Camera"
msgstr ""

Expand Down Expand Up @@ -3077,7 +3074,7 @@ msgctxt "weather_station_types"
msgid "precipitation_heater"
msgstr ""

#: src/views/wiki/edition/ImageEditionView.vue:36
#: src/views/wiki/edition/ImageEditionView.vue:34
msgid "Precise localisation of the shooting"
msgstr ""

Expand Down
4 changes: 2 additions & 2 deletions src/views/document/ImageView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

<field-view :document="document" :field="fields.author" />

<label-value v-if="document.creator" :label="$gettext('creator')">
<author-link :author="document.creator" />
<label-value v-if="document.creator" :label="$gettext('contributor')">
<contributor-link :contributor="document.creator" />
</label-value>

<field-view :document="document" :field="fields.image_type" />
Expand Down
4 changes: 2 additions & 2 deletions src/views/document/XreportView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

<div class="box">
<activities-field :document="document" />
<label-value v-if="document.author" :label="$gettext('author')">
<author-link :author="document.author" />
<label-value v-if="document.author" :label="$gettext('contributor')">
<contributor-link :contributor="document.author" />
</label-value>

<field-view :document="document" :field="fields.event_type" />
Expand Down
2 changes: 1 addition & 1 deletion src/views/document/utils/DocumentVersionBanner.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@

<p>
<icon-document document-type="profile" />
<contributor-link :contributor="version" /> : <em>{{ version.comment }}</em>
<contributor-link :contributor="version" show-whatsnew /> : <em>{{ version.comment }}</em>
</p>
<p v-if="$user.isModerator">
<button
Expand Down
4 changes: 2 additions & 2 deletions src/views/wiki/DiffView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</version-link>
</div>
<div>
by <contributor-link :contributor="oldVersion.version" />
by <contributor-link :contributor="oldVersion.version" show-whatsnew />
</div>
<div>
{{ oldVersion.version.comment }}
Expand Down Expand Up @@ -52,7 +52,7 @@
</version-link>
</div>
<div>
by <contributor-link :contributor="newVersion.version" />
by <contributor-link :contributor="newVersion.version" show-whatsnew />
</div>
<div>
{{ newVersion.version.comment }}
Expand Down
Loading

0 comments on commit aab69ca

Please sign in to comment.