Translate object counter

This commit is contained in:
2019-10-19 19:49:03 +02:00
parent 43ad3c4193
commit 56deda45fe
4 changed files with 6 additions and 4 deletions

View File

@@ -197,7 +197,7 @@ class Spot extends Main
$asMessage['longitude'] = floatval($asMessage['longitude']);
$asMessage['lat_dms'] = self::decToDms($asMessage['latitude'], 'lat');
$asMessage['lon_dms'] = self::decToDms($asMessage['longitude'], 'lon');
$asMessage['displayed_id'] = 'N°'.($iIndex + 1);
$asMessage['displayed_id'] = $iIndex + 1;
$this->addTimeStamp($asMessage, $asMessage['unix_time']);
}
@@ -222,7 +222,7 @@ class Spot extends Main
$sTimeRef = $asMedia[$sTimeRefField];
if($sTimeRef >= $this->oProject->getActivePeriod('from') && $sTimeRef <= $this->oProject->getActivePeriod('to')) {
$asMedia['taken_on_formatted'] = $this->getTimeFormat(strtotime($asMedia['taken_on']));
$asMedia['displayed_id'] = 'N°'.($iIndex + 1);
$asMedia['displayed_id'] = $iIndex + 1;
$this->addTimeStamp($asMedia, strtotime($sTimeRef));
$asValidMedias[] = $asMedia;

View File

@@ -17,6 +17,7 @@ post_message = Message
post_name = Name
post_new_message = New message
and = and
counter = #$0
map_satellite = Satellite
map_otm = Open Topo Map

View File

@@ -17,6 +17,7 @@ post_message = Message
post_name = Nom
post_new_message = Nouveau message
and = et
counter = N° $0
map_satellite = Satellite
map_otm = Open Topo Map

View File

@@ -376,7 +376,7 @@ function initSpotMessages(aoMessages, aoTracks) {
$Tooltip = $('<div>', {'class':'info-window'})
.append($('<h1>')
.addIcon('fa-message fa-fw fa-lg')
.append('Message '+oMsg.type+' '+oMsg.displayed_id))
.append('Message '+oMsg.type+' '+oSpot.lang('counter', oMsg.displayed_id)))
.append($('<p>', {'class':'time'})
.addIcon('fa-time fa-fw fa-lg')
.append(oMsg.formatted_time+(self.vars(['project', 'mode'])==self.consts.modes.blog?' ('+oMsg.relative_time+')':'')+self.tmp('site_tz_notice')))
@@ -541,7 +541,7 @@ function getPost(asPost) {
.append($('<span>', {'class':'time'}).hoverSwap(sRelTime, sAbsTime+self.tmp('site_tz_notice'))))
.append($('<div>', {'class':'body'}).append($Body));
if(asPost.displayed_id) $Post.find('.index').append(' '+asPost.displayed_id);
if(asPost.displayed_id) $Post.find('.index').append(' '+oSpot.lang('counter', asPost.displayed_id));
return $Post;
}