Skip to content
This repository has been archived by the owner on Jul 5, 2018. It is now read-only.

Use new 'Uploaded with WLM Mobile' template instead of our own categories #216

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions assets/www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,11 @@ <h3><msg key="confirm-license-title" /></h3>
{{Information
|description={{<%= descData.monument.lang %>|1=<%= descData.monument.name %>}}
<%= descData.idField %>
{{Uploaded with WLM Mobile
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this need to be localised?

|app-version=<%= descData.appVersion %>
|platform=Android
|user-agent=<%= descData.ua %>
}}
|date=<%= descData.date %>
|source={{own}}
|author=[[User:<%= descData.username %>|<%= descData.username %>]]
Expand Down
14 changes: 5 additions & 9 deletions assets/www/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -847,21 +847,17 @@ require( [ 'jquery', 'l10n', 'geo', 'api', 'templates', 'monuments', 'monument',
}

function formatUploadDescription( monument, campaignConfig, username ) {
var ourCategories = [
'Mobile upload',
'Uploaded with Android WLM App',
'UA: ' + navigator.userAgent.match( /Android (.*?)(?=\))/g )
],
descData = {
var descData = {
idField: campaignConfig.idField.replace( '$1', monument.id ),
license: campaignConfig.defaultOwnWorkLicence, // note the typo in the API field
username: username,
autoWikiText: campaignConfig.autoWikiText,
cats: campaignConfig.defaultCategories.
concat( campaignConfig.autoCategories ).
concat( ourCategories ),
concat( campaignConfig.autoCategories ),
date: dateYMD(),
monument: monument
monument: monument,
ua: navigator.userAgent.match( /Android (.*?)(?=\))/g ),
appVersion: WLMConfig.VERSION_NUMBER
};
var template = templates.getTemplate( 'upload-photo-description', true )( { descData: descData } );
return template;
Expand Down