Skip to content

Commit 2c70d1a

Browse files
v0.70
### Version: Exolve v0.70 May 7 2020 - Added support for non-English languages: - exolve-language: <language-code> <Script> [<max-char-codes-per-letter>] - Required significant changes (but everything should be backward-compatible) in how we check inputs, how we specify the grid, how we save and restore state. - Non-English languages made a known issue slightly worse: the current grid letter was getting rendered in a slightly blurry way, because of a slight position mismatch between the cell-text and grid-input. Tweaked a bit to improve. - Added an exolve-relabel section that can let you change the text of any button (and any HTML element with an id). This should be particularly useful for non-English crosswords.
1 parent 540d217 commit 2c70d1a

26 files changed

+728
-179
lines changed

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
# Changelog
22

3+
### Version: Exolve v0.70 May 7 2020
4+
5+
- Added support for non-English languages:
6+
- exolve-language: <language-code> <Script> [<max-char-codes-per-letter>]
7+
- Required significant changes (but everything should be backward-compatible)
8+
in how we check inputs, how we specify the grid, how we save and restore
9+
state.
10+
- Non-English languages made a known issue slightly worse: the current grid
11+
letter was getting rendered in a slightly blurry way, because of a slight
12+
position mismatch between the cell-text and grid-input. Tweaked a bit to
13+
improve.
14+
- Added an exolve-relabel section that can let you change the text of any
15+
button (and any HTML element with an id). This should be particularly useful
16+
for non-English crosswords.
17+
318
### Version: Exolve v0.69 May 5 2020
419

520
- When a non-numerically labeled across/down clue or a nodir clue can be

README.md

Lines changed: 94 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22

33
## An Easily Configurable Interactive Crossword Solver
44

5-
### Version: Exolve v0.69 May 5 2020
5+
### Version: Exolve v0.70 May 7 2020
6+
7+
Exolve can help you create online interactively solvable crosswords (simple
8+
ones as well as those that are jumbles or are diagramless or are 3-d, etc.)
9+
in any language.
610

711
The file *exolve.html* contains *all* the code you need: just make a copy and
812
then replace the part that contains the example grid with your own puzzle
@@ -153,6 +157,8 @@ and the exolve-end line:
153157
* exolve-question
154158
* exolve-submit
155159
* exolve-option
160+
* exolve-language
161+
* exolve-relabel
156162

157163
Each section has the section name (exolve-something), followed by a colon.
158164
Other than the exolve-prelude, exolve-grid, exolve-across, exolve-down,
@@ -293,7 +299,22 @@ must be provided). The solution letter will be pre-filled and will not be
293299
editable. If all entries in a light are prefilled, and an anno is provided
294300
for that clue, the anno will be shown automatically at start-up.
295301

296-
Here again is the complete list of decorators:
302+
If you use a language/Script that uses compound letters made up of multiple
303+
Unicode characters (for example, Devanagari—see the exolve-language section),
304+
then your _must_ separate grid letters (when specifying a grid with solutions)
305+
with a space (unless they are already separated by decorator). For example,
306+
this will *not* work:
307+
```
308+
exolve-grid:
309+
सेहत
310+
```
311+
This will work:
312+
```
313+
exolve-grid:
314+
से ह त
315+
```
316+
317+
As a convenient reference, here again is the complete list of decorators:
297318
```
298319
| draw bar after
299320
_ draw bar under
@@ -697,6 +718,77 @@ The list of currently supported options is as follows:
697718
the display of buttons to copy placeholder texts in those cases (see the
698719
subsection below on "Jigsaw puzzle clues").
699720

721+
## exolve-language
722+
723+
You can create crosswords in pretty much any language apart from English,
724+
using Exolve. You need to specify a line that looks like:
725+
```
726+
exolve-language: <lang> <Script> [<max-char-codes-per-letter>]
727+
```
728+
Here, &lt;lang&gt; is a
729+
[language code](https://www.w3schools.com/tags/ref_language_codes.asp)
730+
such as "ru" or "hi" and &lt;Script&gt; is the name of the
731+
[Script](https://tc39.es/ecma262/#table-unicode-script-values)
732+
to use for that language, such as "Devanagari" or "Cyrillic".
733+
Examples:
734+
```
735+
exolve-language: hi Devanagari
736+
```
737+
```
738+
exolve-language: ru Cyrillic
739+
```
740+
741+
On an exolve-language line, you can optionally specify a third parameter,
742+
"&lt;max-char-codes-per-letter&gt;". In some languages such as those using the
743+
Devanagari script, multiple unicode characters are combined together to
744+
form a single compound letter (for example, स्सा in Devanagari is made up
745+
of four characters). In these situations, you can specify
746+
&lt;max-char-codes-per-letter&gt; as the limit on how many characters you want
747+
to allow to go into a composite letter, at most. For Devanagari, the software
748+
already sets this to 4 (but you can override that if you specify a value
749+
here). When &lt;max-char-codes-per-letter&gt; is greater than 1, auto-advance is
750+
disabled, as the software cannot know when a letter being entered in a cell
751+
is finished—solvers need to use the arrow key or need to click on the next
752+
cell when they finish typing a letter.
753+
754+
When you use a language other than English, you may also want to change the
755+
text displayed in various buttons etc. to that language. You can do that
756+
using an exolve-relabel section (see below). Further, you may want to let
757+
solvers know that they have to use a suitable input mechanism for the
758+
Script you have specified (Google Input Tools works well on Chrome).
759+
760+
## exolve-relabel
761+
762+
You can change the text of any button or label in the rendered grid. This is
763+
particularly useful if you want to set a crossword in a language other than
764+
English. The text of any HTML element that has an id can be modified in this
765+
section. It can be set to some other text (or HTML), using the syntax:
766+
```
767+
<id>: <new label>
768+
```
769+
The section can contain multiple such relabelings, one per line. Example:
770+
```
771+
exolve-relabel:
772+
clear: <b>Erase</b> this entry
773+
across-label: <i>Swimming Across!</i>
774+
down-label: <i>Sinking Down (नीचे)!</i>
775+
```
776+
Here are some of the ids that you can relabel:
777+
| ID | Current label (that you can replace) |
778+
|----------------|--------------------------------------|
779+
| clear | Clear this |
780+
| clear-all | Clear all! |
781+
| check | Check this |
782+
| check-all | Check all! |
783+
| reveal | Reveal this |
784+
| reveal-all | Reveal all! |
785+
| setter-by | By |
786+
| squares-filled | Squares filled |
787+
| submit | Submit |
788+
| across-label | Across |
789+
| down-label | Down |
790+
791+
700792
## Saving state
701793
The software automatically saves state. It does so in the URL (after the #)
702794
and also in a cookie, using the id specified in the exolve-id section as the

exolve-m.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Copyright (c) 2019 Viresh Ratnakar
55
66
See the full license notice in exolve-m.js.
77
8-
Version: Exolve v0.69 May 5 2020
8+
Version: Exolve v0.70 May 7 2020
99
*/
1010

1111
.background {
@@ -138,10 +138,10 @@ td:first-child:not(.filler) {
138138
#grid-input {
139139
text-align: center;
140140
text-anchor: middle;
141-
border: 0;
141+
border: none;
142142
width: 100%;
143143
height: 100%;
144-
padding: 0;
144+
padding: 2px 0 0 0;
145145
background: rgba(255,0,0,0.2);
146146
}
147147
#controls-etc {

exolve-m.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
1212
See the full license notice in exolve-m.js.
1313
14-
Version: Exolve v0.69 May 5 2020
14+
Version: Exolve v0.70 May 7 2020
1515
-->
1616

17-
<link rel="stylesheet" type="text/css" href="exolve-m.css?v0.69"/>
18-
<script src="exolve-m.js?v0.69"></script>
17+
<link rel="stylesheet" type="text/css" href="exolve-m.css?v0.70"/>
18+
<script src="exolve-m.js?v0.70"></script>
1919

2020
<title>Exolve: An Easily Configurable Interactive Crossword Solver</title>
2121

0 commit comments

Comments
 (0)