Skip to content

Commit

Permalink
Feature 539 Add QE to integrations pages (#540)
Browse files Browse the repository at this point in the history
* Add QE to Integrations pages

* Fix punctuation

* Improve wording

* Modify data

---------

Co-authored-by: Tovmas <tharrison748@gmail.com>
  • Loading branch information
tovmasharrison and Tovmas authored Sep 26, 2023
1 parent 937a77f commit e901aad
Show file tree
Hide file tree
Showing 68 changed files with 340 additions and 191 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ DEPENDENCIES
github-pages
html-proofer
jekyll-feed (~> 0.12)
jekyll-include-cache
jekyll-include-cache
jekyll-redirect-from
jekyll-seo-tag
nokogiri (>= 1.6.7.rc)
Expand Down
23 changes: 14 additions & 9 deletions _data/integrations.json
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,11 @@
}
}
],
"quality_estimation_integrations": [
"quality_estimation_integrations":[
{
"modelfront": null,
"custom": true
"modelfront": {
"custom": true
}
}
],
"local_api_support": true,
Expand Down Expand Up @@ -727,10 +728,11 @@
},
"yandex"
],
"quality_estimation_integrations": [
"quality_estimation_integrations":[
{
"phrase-mtqe": null,
"custom": false
"phrase-mtqe": {
"custom": false
}
}
],
"routing": true
Expand Down Expand Up @@ -1404,13 +1406,16 @@
}
}
],
"quality_estimation_integrations": [
"quality_estimation_integrations":[
{
"modelfront": null,
"custom": true
"modelfront": {
"custom": true
}
}
],

"edit_distance": true

},
{
"id": "wordbee",
Expand Down
15 changes: 7 additions & 8 deletions _layouts/aggregator.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,14 @@ <h2>
</h2>

<p>
The <strong>{{ page.title }}</strong> <a href="/aggregators">aggregator</a> supports <a href="#api-support">{{ page.supported_apis | size }} machine translation APIs</a>.
The <strong>{{ page.title }}</strong> <a href="/aggregators">aggregator</a> supports <a href="#machine-translation">{{ page.supported_apis | size }} machine translation APIs</a>.
</p>

<blockquote>
<dl>
<dt>Supported APIs</dt>
<dd><a href="#machine-translation">{{ page.supported_apis | size }} APIs</a></dd>
</dl>
{% if page.urls.size > 0 %}
<hr/>
<ul>
Expand All @@ -25,16 +29,11 @@ <h2>
{% endfor %}
</ul>
{% endif %}

<dl>
<dt>Supported APIs</dt>
<dd><a href="#supported_apis">{{ page.supported_apis | size }} APIs</a></dd>
</dl>

</blockquote>

{{ content }}

<section id="api-support">
<section id="machine-translation">
<h2>API support</h2>
<details>
<summary>
Expand Down
8 changes: 2 additions & 6 deletions _layouts/api.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,9 @@ <h2>

<p>
{% if page.integrations.size == 1 %}
There is <a href="#integrations">1 integration</a> with a translation management system.
{% endif %}
<a href="#integrations">1 machine translation management system</a> has integrated the <strong>{{ page.title }}</strong> machine translation API.{% endif %}
{% if page.integrations.size > 1 %}
{{ page.integrations | size }} machine translation management systems have <a href="#integrations">{{ page.title }} integrations</a>
<a href="#integrations">{{ page.integrations | size }} machine translation management systems</a> have <strong>{{ page.title }}</strong> integrations.
{% endif %}
</p>

Expand Down Expand Up @@ -168,7 +167,6 @@ <h2>Language support</h2>

{% endif %}

{% if page.integrations.size > 0 %}

<section id="integrations">
<h2>Integrations</h2>
Expand All @@ -193,5 +191,3 @@ <h2>Integrations</h2>
</ul>
</details>
</section>

{% endif %}
68 changes: 50 additions & 18 deletions _layouts/integration.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,37 @@ <h2>

<p>
{% if page.api_integrations.size == 1 %}
The <strong>{{ page.title }}</strong> {{ page.type_description }} has <a href="#api-support">{{ page.api_integrations | size }} machine translation API integration</a>.
<a href="#integrations">1 machine translation API</a> has been integrated by the <strong>{{ page.title }}</strong> translation management system.
{% else %}
The <strong>{{ page.title }}</strong> {{ page.type_description }} has <a href="#api-support">{{ page.api_integrations | size }} machine translation API integrations</a>.
The <strong>{{ page.title }}</strong> {{ page.type_description }} has <a href="#machine-translation">{{ page.api_integrations | size }} machine translation API integrations</a>.
{% endif %}
</p>

<p>
{% if page.quality_estimation_integrations.size == 1 %}
<a href="#quality-estimation">1 quality estimation API</a> has been integrated by the <strong>{{ page.title }}</strong> translation management system.
{% else %}
The <strong>{{ page.title }}</strong> translation management system has <a href="#quality-estimation">{{ page.quality_estimation_integrations | size }} quality estimation API integrations</a>.
{% endif %}
</p>

<blockquote>
<dl>

<dt>API support</dt>
{% if page.api_integrations.size == 1 %}
<dd><a href="#api-support">1 API</a></dd>
{% else %}
<dd><a href="#api-support">{{ page.api_integrations | size }} APIs</a></dd>
{% endif %}

{% if page.open-source %}
<dd>Open-source</dd>
{% endif %}
<dd>
{% if page.api_integrations.size > 0 %}
<a href="#machine-translation">{{ page.api_integrations.size }} machine translation API{% if page.api_integrations.size > 0 %}s{% endif %}</a>{% if page.quality_estimation_integrations.size > 0 %},{% endif %}
{% endif %}
</dd>
<dd>
{% if page.quality_estimation_integrations.size > 0 %}
<a href="#quality-estimation"> {{ page.quality_estimation_integrations.size }} quality estimation API{% if page.quality_estimation_integrations.size > 1 %}s{% endif %} </a>
{% endif %}
</dd>



</dl>

<hr/>
Expand All @@ -45,8 +57,8 @@ <h2>

{{ content }}

<section id="api-support">
<h2>API support</h2>
<section id="machine-translation">
<h2>Machine translation</h2>
<details>
<summary>
<strong>{{ page.api_integrations | size }}</strong> machine translation API integrations are available for {{ page.title }}.
Expand All @@ -58,11 +70,7 @@ <h2>API support</h2>
<ul>
{% for api in page.api_integrations %}
<li>
{% if api.plugin %}
<a href="/{{ api.slug }}">{{ api.name }}</a> (plugin)
{% else %}
<a href="/{{ api.slug }}">{{ api.name }}</a>
{% endif %}
<a href="/{{ api.slug }}">{{ api.name }}</a> {% if api.plugin %}(plugin){% endif %}
{% if api.custom or api.glossary or api.formality %}
{% if api.custom %}| <strong>fine-tuning</strong> support{% endif %}
{% if api.glossary %}| <strong>glossary</strong> support{% endif %}
Expand All @@ -73,6 +81,30 @@ <h2>API support</h2>
</details>
</section>


<section id="quality-estimation">
<h2>Quality estimation</h2>
<details>
<summary>
<strong>{{ page.quality_estimation_integrations| size }}</strong> Quality estimation API integrations are available for {{ page.title }}.
<p class="preview hint">
{{page.quality_estimation_integrations | slice: 0, 5 | map: 'name' | join: ', ' }}
{% if page.quality_estimation_integrations > 5 %}, …{% endif %}
</p>
</summary>
<ul>
{% for qe in page.quality_estimation_integrations %}
<li>
<a href="/{{ qe.slug }}">{{ qe.name }}</a> {% if qe.plugin %}(plugin){% endif %}
{% if qe.custom %}
{% if qe.custom %}| <strong>fine-tuning</strong> support{% endif %}
{% endif %}
</li>
{% endfor %}
</details>
</section>


{% if page.fuzzy_repair %}
<h2>Other features</h2>
{{ page.description }} offers <strong>fuzzy repair</strong> with machine translation.
Expand Down
4 changes: 2 additions & 2 deletions _layouts/language.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ <h2>
<hr/>

<p>
Machine translation for the <strong>{{ page.title }}</strong> language is supported by <a href="#api-support">{{ page.supported_apis | size }} machine translation APIs</a>.
Machine translation for the <strong>{{ page.title }}</strong> language is supported by <a href="#machine-translation">{{ page.supported_apis | size }} machine translation APIs</a>.
</p>

<blockquote>
Expand Down Expand Up @@ -53,7 +53,7 @@ <h2>

{{ content }}

<section id="api-support">
<section id="machine-translation">
<h2>API support</h2>
<details>
<summary>
Expand Down
Loading

0 comments on commit e901aad

Please sign in to comment.