|
| 1 | +<template name="mf">{{{helper UI.contentBlock}}}</template> |
| 2 | + |
| 3 | +<template name="mfTrans"> |
| 4 | + <div class="container" id="mfTransContainer"> |
| 5 | + <h2>{{mf 'mf_site_translations' 'Site Translations'}}</h2> |
| 6 | + <p>Native language: <b>{{native}}</b> ({{stats.total}} strings)</p> |
| 7 | + |
| 8 | + {{#if stats.total}} |
| 9 | + |
| 10 | + <table class="mfTrans"> |
| 11 | + <tr> |
| 12 | + <th>Language</th> |
| 13 | + <th>trans.</th> |
| 14 | + <th>%</th> |
| 15 | + <th>fuzzy</th> |
| 16 | + <th>%</th> |
| 17 | + <th>untrans</th> |
| 18 | + <th>%</th> |
| 19 | + <th>graph</th> |
| 20 | + </tr> |
| 21 | + {{#each stats.langs}} |
| 22 | + <tr> |
| 23 | + <td><a href="/translate/{{lang}}">{{lang}}</a></td> |
| 24 | + <td>{{trans}}</td> |
| 25 | + <td>{{transPercent}}</td> |
| 26 | + <td>{{fuzzy}}</td> |
| 27 | + <td>{{fuzzyPercent}}</td> |
| 28 | + <td>{{untrans}}</td> |
| 29 | + <td>{{untransPercent}}</td> |
| 30 | + <td> |
| 31 | + <div class="mfTransGraph trans" style="{{transWidth}}"></div |
| 32 | + ><div class="mfTransGraph fuzzy" style="{{fuzzyWidth}}"></div |
| 33 | + ><div class="mfTransGraph untrans" style="{{untransWidth}}"></div> |
| 34 | + </td> |
| 35 | + </tr> |
| 36 | + {{/each}} |
| 37 | + </table> |
| 38 | + |
| 39 | + <br /> |
| 40 | + <p> |
| 41 | + New language: |
| 42 | + <input type="text" id="mfTransNewText" placeholder="fr, en_GB, etc" /> |
| 43 | + <input type="submit" id="mfTransNewSubmit" value="Go" /> |
| 44 | + </p> |
| 45 | + |
| 46 | + <p> |
| 47 | + Download <a id="mfAllJs" href="/translate/mfAll.js">server/mfAll.js</a> |
| 48 | + (latest strings from all langs; save before redeploying/releasing an app) |
| 49 | + </p> |
| 50 | + <!-- |
| 51 | + <p> |
| 52 | + Download <a href="/translate/mfSmart.js">server/mfSmart.js</a> |
| 53 | + (all strings, untranslateable; save before releasing a smart package) |
| 54 | + </p> |
| 55 | + --> |
| 56 | + |
| 57 | + {{else}} |
| 58 | + |
| 59 | + <p>Run <b>mf_extract</b> in the root directory of your project to extract |
| 60 | + all the translateable strings.</p> |
| 61 | + |
| 62 | + <p>For more details see: |
| 63 | + <a href="http://messageformat.meteor.com/">messageformat.meteor.com</a>. |
| 64 | + </p> |
| 65 | + |
| 66 | + {{/if}} |
| 67 | + </div> |
| 68 | +</template> |
| 69 | + |
| 70 | +<template name="mfTransLang"> |
| 71 | + <div class="container" id="mfTransLang"> |
| 72 | + |
| 73 | + <div id="mfTransPreview"> |
| 74 | + <table> |
| 75 | + <thead> |
| 76 | + <tr> |
| 77 | + <th>Original String ({{orig}})</th> |
| 78 | + <th>Translation ({{trans}})</th> |
| 79 | + </tr> |
| 80 | + </thead> |
| 81 | + </table> |
| 82 | + <div class="tbodyScroll"> |
| 83 | + <table> |
| 84 | + <tbody> |
| 85 | + {{#each strings}} |
| 86 | + <tr data-key="{{key}}" class="{{stateClass}} {{isCurrent}}"> |
| 87 | + <td>{{orig}}</td> |
| 88 | + <td>{{trans}}</td> |
| 89 | + </tr> |
| 90 | + {{/each}} |
| 91 | + </tbody> |
| 92 | + </table> |
| 93 | + </div> |
| 94 | + </div> |
| 95 | + <p>Keyboard shortcuts: Ctrl-up/down arrow (Win); Control-Command-up/down arrow (Mac)</p> |
| 96 | + <span><b>{{keyInfo.key}}</b> in {{keyInfo.file}}:{{keyInfo.line |
| 97 | + }}{{#if keyInfo.template}} (template |
| 98 | + {{#if keyInfo.routeUrl}} |
| 99 | + <a href="{{keyInfo.routeUrl}}">{{keyInfo.template}}</a |
| 100 | + >{{else}}"{{keyInfo.template}}"{{/if}}){{/if |
| 101 | + }}{{#if keyInfo.func}}; {{keyInfo.func}}{{/if}} |
| 102 | + </span><br /> |
| 103 | + <textarea id="mfTransOrig" readonly>{{mfTransOrig}}</textarea> |
| 104 | + <textarea id="mfTransDest">{{mfTransTrans}}</textarea> |
| 105 | + |
| 106 | + <br /><br /> |
| 107 | + <p> |
| 108 | + <a href="/translate">Back to Translation Summary</a> |
| 109 | + </p> |
| 110 | + |
| 111 | + </div> |
| 112 | +</template> |
| 113 | + |
| 114 | + |
| 115 | +<template name="mfTransLangDenied"> |
| 116 | + <div class="container" id="mfTransLang"> |
| 117 | + <h1>{{mf 'access_denied' 'Access Denied'}}</h1> |
| 118 | + <p>{{mf 'login_and_access' 'Please ensure you are logged in and have the relevant access to add/edit translations.'}}</p> |
| 119 | + </div> |
| 120 | +</template> |
0 commit comments