mirror of
https://github.com/LibreTranslate/LibreTranslate.git
synced 2024-12-22 23:26:31 +00:00
Merge branch 'main' into add-docker
This commit is contained in:
commit
61f388e770
3 changed files with 13 additions and 7 deletions
|
@ -2,7 +2,7 @@
|
|||
|
||||
[Try it online!](https://libretranslate.com) | [API Docs](https://libretranslate.com/docs)
|
||||
|
||||
Free and Open Source Translation API, entirely self-hosted and works even in offline environments. Unlike other APIs, it doesn't rely on proprietary providers such as Google or Azure to perform translations.
|
||||
Free and Open Source Machine Translation API, entirely self-hosted and works even in offline environments. Unlike other APIs, it doesn't rely on proprietary providers such as Google or Azure to perform translations.
|
||||
|
||||
![image](https://user-images.githubusercontent.com/1951843/102724116-32a6df00-42db-11eb-8cc0-129ab39cdfb5.png)
|
||||
|
||||
|
|
|
@ -1,8 +1,14 @@
|
|||
from flask import Flask, render_template, jsonify, request, abort, send_from_directory
|
||||
from flask_swagger import swagger
|
||||
from flask_swagger_ui import get_swaggerui_blueprint
|
||||
from flask_limiter.util import get_remote_address
|
||||
|
||||
def get_remote_address():
|
||||
if request.headers.getlist("X-Forwarded-For"):
|
||||
ip = request.headers.getlist("X-Forwarded-For")[0]
|
||||
else:
|
||||
ip = request.remote_addr or '127.0.0.1'
|
||||
|
||||
return ip
|
||||
|
||||
def create_app(char_limit=-1, req_limit=-1, ga_id=None, debug=False):
|
||||
from app.init import boot
|
||||
|
|
|
@ -3,15 +3,15 @@
|
|||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>LibreTranslate - Free and Open Source Translation API</title>
|
||||
<meta name="description" content="Free and Open Source Translation API. 100% self-hosted, no limits, no ties to proprietary services. Run your own API server in just a few minutes.">
|
||||
<title>LibreTranslate - Free and Open Source Machine Translation API</title>
|
||||
<meta name="description" content="Free and Open Source Machine Translation API. 100% self-hosted, no limits, no ties to proprietary services. Run your own API server in just a few minutes.">
|
||||
<meta name="keywords" content="translation,api">
|
||||
|
||||
<meta property="og:title" content="LibreTranslate - Free and Open Source Translation API" />
|
||||
<meta property="og:title" content="LibreTranslate - Free and Open Source Machine Translation API" />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:url" content="https://libretranslate.com" />
|
||||
<meta property="og:image" content="https://user-images.githubusercontent.com/1951843/102724116-32a6df00-42db-11eb-8cc0-129ab39cdfb5.png" />
|
||||
<meta property="og:description" name="description" class="swiftype" content="Free and Open Source Translation API. 100% self-hosted, no limits, no ties to proprietary services. Run your own API server in just a few minutes."/>
|
||||
<meta property="og:description" name="description" class="swiftype" content="Free and Open Source Machine Translation API. 100% self-hosted, no limits, no ties to proprietary services. Run your own API server in just a few minutes."/>
|
||||
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/vue@2"></script>
|
||||
|
@ -210,7 +210,7 @@
|
|||
<div class="row">
|
||||
<div class="col l6 s12">
|
||||
<h5 class="white-text">LibreTranslate</h5>
|
||||
<p class="grey-text text-lighten-4">Free and Open Source Translation API</p>
|
||||
<p class="grey-text text-lighten-4">Free and Open Source Machine Translation API</p>
|
||||
<p class="grey-text text-lighten-4">
|
||||
Made with ❤ by <a class="grey-text text-lighten-3" href="https://uav4geo.com">UAV4GEO</a> and powered by <a class="grey-text text-lighten-3" href="https://github.com/argosopentech/argos-translate/">Argos Translate</a>
|
||||
</p>
|
||||
|
|
Loading…
Reference in a new issue