Full-record template invokes {{translate}} on fieldnames.
authorMike Taylor <mike@indexdata.com>
Tue, 7 Jan 2014 13:41:27 +0000 (13:41 +0000)
committerMike Taylor <mike@indexdata.com>
Tue, 7 Jan 2014 13:41:27 +0000 (13:41 +0000)
Fixes MKWS-84 Translate fieldnames in full-record popup.

tools/htdocs/mkws.js

index 7a767f4..cacc8d0 100644 (file)
@@ -788,7 +788,7 @@ function defaultTemplate(name)
        return '\
       <table>\
        <tr>\
-         <th>Title</th>\
+         <th>{{translate "Title"}}</th>\
          <td>\
            {{md-title}}\
            {{#if md-title-remainder}}\
@@ -801,19 +801,19 @@ function defaultTemplate(name)
        </tr>\
        {{#if md-date}}\
        <tr>\
-         <th>Date</th>\
+         <th>{{translate "Date"}}</th>\
          <td>{{md-date}}</td>\
        </tr>\
        {{/if}}\
        {{#if md-author}}\
        <tr>\
-         <th>Author</th>\
+         <th>{{translate "Author"}}</th>\
          <td>{{md-author}}</td>\
        </tr>\
        {{/if}}\
        {{#if md-electronic-url}}\
        <tr>\
-         <th>URL</th>\
+         <th>{{translate "URL"}}</th>\
          <td>\
            {{#each md-electronic-url}}\
              <a href="{{this}}">{{this}}</a><br/>\
@@ -823,7 +823,7 @@ function defaultTemplate(name)
        {{/if}}\
        {{#if-any location having="md-subject"}}\
        <tr>\
-         <th>Subject</th>\
+         <th>{{translate "Subject"}}</th>\
          <td>\
            {{#first location having="md-subject"}}\
              {{#if md-subject}}\
@@ -834,7 +834,7 @@ function defaultTemplate(name)
        </tr>\
        {{/if-any}}\
        <tr>\
-         <th>Locations</th>\
+         <th>{{translate "Locations"}}</th>\
          <td>\
            {{#commaList location}}\
              {{attr "@name"}}{{/commaList}}\