all repos — gemini-redirect @ 6f0d08cff1bbc4aa09a1f4e09e1ef5f2cb29a882

stringlate/index.html (view raw)

  1<!DOCTYPE html>
  2<html>
  3  <head>
  4    <title>Stringlate</title>
  5    <link rel="stylesheet" type="text/css" href="style.css">
  6    <link href="https://fonts.googleapis.com/css?family=Crimson+Text|Droid+Serif" rel="stylesheet">
  7    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
  8    <link rel="shortcut icon" href="favicon.ico" />
  9  </head>
 10  <body>
 11    <main>
 12      <h1>Stringlate</h1>
 13      <p><em>Help translating FOSS applications.</em></p>
 14
 15      <h2>Deprecation Notice</h2>
 16      <p>I, Lonami, have lost most interest in maintaining Stringlate.</p>
 17
 18      <p><strong>There are a few big issues with a big impact and I don't want
 19      them to cause more harm than good</strong>, so I'm making it clear that
 20      I am aware of the issues and that you should know about them too if you
 21      still decide to make use the application.</p>
 22
 23      <p>Stringlate started as an idea to suit my personal needs. My mum wanted
 24      an application but it was only available in English, so I decided to
 25      translate it myself. However, doing so proved very inconvenient, and I
 26      decided to make my own Android application to help me in the process. In
 27      the end though, I made the translation by hand far sooner, before the
 28      application was ready :)</p>
 29
 30      <p>It was a fun project, and I learnt a lot, but any issues in the
 31      application have serious implications, since they impact a lot of open
 32      source projects. There are several big issues:</p>
 33
 34      <ul>
 35          <li>Making a pull request may use old state of the repository</li>
 36          <li>Some tags like bool and string arrays aren't handled well</li>
 37          <li>Some projects only accept changes through other platforms</li>
 38          <li>Integration with other services could really be improved</li>
 39      </ul>
 40
 41      <p><strong>In short</strong>, please consider other ways to help
 42      translating the project you like instead of using Stringlate.</p>
 43
 44      <p>If you're interested in <strong>maintaining Stringlate</strong>,
 45      please <a href="https://lonami.dev/contact">contact me</a> and
 46      we can discuss it further. Thank you for your interest, and thanks to
 47      everyone who has contributed translations. It's been a nice journey!</p>
 48
 49      <p><em>(The rest of the page remains the same for historical
 50      purposes.)</em></p>
 51
 52      <h1>About Stringlate</h1>
 53
 54      <p>
 55        This application is meant to help the FOSS community translate their
 56        Android applications in an easy way. Any free moment you have could
 57        be invested into translating that application you love, but is not
 58        available in your language, or has some strings wrong.
 59      </p>
 60
 61      <p>
 62        The application works by fetching a <code>git</code> repository (yes, any!)
 63        to retrieve all the available strings, for you to translate whenever
 64        you want, offline. Once you're done, submit your work!
 65      </p>
 66
 67      <p>
 68        This application is of course open source, and is available on both
 69        <a href="https://github.com/LonamiWebs/Stringlate">GitHub</a> and
 70        <a href="https://f-droid.org/app/io.github.lonamiwebs.stringlate">F-Droid</a>.
 71      </p>
 72
 73      <h1>Integrating with your own app</h1>
 74      <p>
 75        Are you a developer? Are you interested on people knowing that they
 76        can use Stringlate to translate your application? If both answers are
 77        yes, that's awesome!
 78      </p>
 79
 80      <p>
 81        There are several ways to do this, one is from in-app, for which
 82        you can check and use this plain simple
 83        <a href="https://github.com/LonamiWebs/Stringlate/blob/master/src/app/src/main/java/io/github/lonamiwebs/stringlate/utilities/StringlateApi.java">API</a>
 84        <sup>(<a href="https://github.com/LonamiWebs/Stringlate/issues/72">original issue</a>)</sup>.
 85      </p>
 86
 87      <p>
 88        Another way is by creating a <a href="http://shields.io/">badge</a>
 89        <sup>(<a href="https://github.com/gsantner/memetastic">original idea</a>)</sup>
 90        for Stringlate:
 91      </p>
 92
 93      <img
 94        src="https://img.shields.io/badge/translate%20with-stringlate-green.svg"
 95        alt="translate with stringlate badge" />
 96      <pre>&lt;a href="https://lonami.dev/stringlate/translate?git={git url}"&gt;
 97  &lt;img
 98    src="https://img.shields.io/badge/translate%20with-stringlate-green.svg"
 99    alt="Translate - with Stringlate" /&gt;
100&lt;/a&gt;
101
102&lt;!-- or using markdown --&gt;
103[![Translate - with Stringlate](https://img.shields.io/badge/translate%20with-stringlate-green.svg)](https://lonami.dev/stringlate/translate?git={git url})</pre>
104
105      <p>
106        You should replace <code>{git url}</code> to wherever your project's
107        <code>git</code> lives. It should be encoded to be a valid parameter
108        though.
109      </p>
110
111      <noscript><p>
112        You can also enable JavaScript to simply generate the badge link
113        right from this page!
114      </p></noscript>
115
116      <div id="generateUrlDiv" style="display:none">
117        <p>You can also enter said URL here and get the code straight away:</p>
118
119        <label for="gitUrl">Project's <code>git</code> URL:</label>
120        <input type="text" id="gitUrl" oninput="updateBadgeCode()">
121        <select id="genKind" onchange="updateBadgeCode()">
122          <option value="html">HTML</option>
123          <option value="md">Markdown</option>
124        </select>
125
126        <p>Generated code (copy and paste this on your <code>README</code>):</p>
127        <textarea id="generatedCode" readonly></textarea><br>
128        <button id="copyButton" onclick="copyGenerated()">Copy text</button>
129      </div>
130      <noscript>If you want <p>
131        If you had JavaScript enabled, I could tell you which repository you
132        were trying to translate. But it's fine!
133      </p></noscript>
134      <p id="whichAppP" style="display:none">
135        You were probably trying to translate <a id="whichAppA"></a>.
136      </p>
137    </main>
138
139    <script>
140      var generateUrlDiv = document.getElementById('generateUrlDiv');
141      generateUrlDiv.style.display = '';
142
143      var gitUrl = document.getElementById('gitUrl');
144      var genKind = document.getElementById('genKind');
145      var generatedCode = document.getElementById('generatedCode');
146      var copyButton = document.getElementById('copyButton');
147
148      function updateBadgeCode() {
149        var translateUrl =
150          'https://lonami.dev/stringlate/translate?git='+
151          encodeURIComponent(gitUrl.value);
152
153        var badgeUrl =
154          'https://img.shields.io/badge/translate%20with-stringlate-green.svg';
155
156        switch (genKind.value) {
157          case 'html':
158            generatedCode.rows = 5;
159            generatedCode.value =
160              '<a href="'+translateUrl+
161              '>\n  <img\n    src="'+badgeUrl+
162              '"\n    alt="Translate - with Stringlate" />\n</a>';
163            break;
164          case 'md':
165            generatedCode.rows = 2;
166            generatedCode.value =
167              '[![Translate - with Stringlate]('+badgeUrl+
168              ')]('+translateUrl+')';
169            break;
170        }
171      }
172
173      function copyGenerated() {
174        generatedCode.select();
175        try {
176            var ok = document.execCommand('copy');
177            if (ok) copyButton.innerHTML = 'Copied!';
178            else    copyButton.innerHTML = 'Unable to copy!';
179        } catch (err) {
180            answer.innerHTML = 'Unsupported browser!';
181        }
182
183        setTimeout(function(){ copyButton.innerHTML = 'Copy text'; }, 2000);
184      }
185    </script>
186  </body>
187</html>