In certain cases it is appropriate to abbreviate a link.
Below are a list of cases where you are allowed to use an abbreviation.
When linking to a different section within the same RC
you may leave off the Scheme and simply provide a UNIX styled relative file path.
File extensions are optional.
For example, let’s say we have the following RC:
| | |-title.md
| | |-sub-title.md
| | |-01.md <====== link from here
| |-acceptable/ <====== to here
| | |-title.md
| | |-sub-title.md
| | |-01.md
With the addition of internal links we can reference the “Acceptable Style” article
from within the “Introduction to translationAcademy” in any of the following ways:
A better use case for relative paths would be in tW using the condensed form.
| | |-aaron.md
| | |-moses.md
| | ...
In the above example the Manifest File will refer to the
/bible directory as the project path.
From within aaron.md we can link to moses in any of the following ways:
For compatibility with displaying in online services such as github or DCS we suggest either including the file extension
when practical or using a fully qualified link complete with the
A short link is used to reference a resource but not a project.
Short links are composed of just the language and resource.
Short links are used within the Manifest File when referring to related resources.
Bible references in any RC may be automatically converted into resolvable links according to the linking rules for book resource types.
Of course, if the biblical reference is already a link nothing needs to be done.
Conversion of biblical references are limited to those resources that have been indexed on the users’ device.
Conversion should be performed if in the text either of the following conditions is satisfied:
- a case insensitive match of the entire project title. e.g.
Genesis is found in the text.
- a start case (first letter is uppercase) match of the project Identifier e.g.
For each case above there must be a valid
chapter:verse reference immediately after the matching word separated a single white space.
The chapter and verse numbers should be converted to properly formatted identifiers.
Given the French reference below:
If the user has only downloaded the English resource the link will not resolve because the title
genesis does not match
Neither does the camel case Identifier
Gen match since it does not match the entire word.
If the user now downloads the French resource the link will resolve because
genèse does indeed match
The result will be:
When a match occurs there may be several different resources that could be used in the link such as
When more than one resource Identifier is available use the following rules in order until a unique match is found:
- use the same resource as indicated by the application context.
- use the RC allowed by the translate_mode set in the application.
- choose the first resource found or let the user choose (e.g. pop up).
Aligning Verses to Chunks
Because chunks may contain a range of verses, a passage reference may not exactly match up to a chunk.
Therefore some interpolation may be necessary. For both chapter and verse numbers perform the follow:
Given a chapter or verse number key.
And an equivalent sorted list list of chapters or verses in the matched resource
- incrementally compare the key against items in the list.
- if the integer value of the current list item is less than the key: continue.
- if the integer value of the current list item is greater than the key: use the previous item in the list.
- if the end of the list is reached: use the previous item in the list.
For example chunk
01 may contain verses
1-3 whereas chunk
02 contains verses
2 would resolve to chunk
If no chapter or chunk can be found to satisfy the reference it should not be converted to a link.