Translate hardcoded strings and UI to English

This commit is contained in:
2026-09-17 14:25:38 +02:00
parent 282ea8784b
commit 6a386d7d21
5 changed files with 18 additions and 19 deletions
Binary file not shown.
+10 -10
View File
@@ -12,30 +12,30 @@
<div class="checkboxContainer checkboxContainer-withDescription"> <div class="checkboxContainer checkboxContainer-withDescription">
<label> <label>
<input type="checkbox" is="emby-checkbox" id="chkEnablePlugin" /> <input type="checkbox" is="emby-checkbox" id="chkEnablePlugin" />
<span>Włącz wykrywanie czarnych pasów</span> <span>Enable Black Bar Detection</span>
</label> </label>
<div class="fieldDescription checkboxFieldDescription">Włącza automatyczne skanowanie nowych i zaktualizowanych materiałów wideo w bibliotece.</div> <div class="fieldDescription checkboxFieldDescription">Enables automatic scanning of new and updated video files in the library.</div>
</div> </div>
<div class="inputContainer"> <div class="inputContainer">
<label class="inputLabel inputLabelUnfocused" for="txtCropLimit">Tolerancja detekcji czarnych pasów (0.01 - 1.0):</label> <label class="inputLabel inputLabelUnfocused" for="txtCropLimit">Black Bar Detection Tolerance (0.01 - 1.0):</label>
<input type="number" step="0.01" min="0.01" max="1.0" id="txtCropLimit" is="emby-input" required /> <input type="number" step="0.01" min="0.01" max="1.0" id="txtCropLimit" is="emby-input" required />
<div class="fieldDescription">Domyślnie 0.15. Zwiększ, jeśli czarne pasy nie są wykrywane ze względu na szum wideo (np. dla plików WEBDL zmień na 0.2).</div> <div class="fieldDescription">Default is 0.15. Increase this value if black bars are not being detected due to video noise (e.g., change to 0.20 for WEB-DL).</div>
</div> </div>
<div class="selectContainer"> <div class="selectContainer">
<label class="selectLabel" for="selectPlaybackMode">Sposób usuwania pasów w odtwarzaczu:</label> <label class="selectLabel" for="selectPlaybackMode">Black Bar Removal Method:</label>
<select is="emby-select" id="selectPlaybackMode" class="emby-select-withcolor"> <select is="emby-select" id="selectPlaybackMode" class="emby-select-withcolor">
<option value="Server">Tylko Serwer (Transkodowanie FFmpeg)</option> <option value="Server">Server Only (FFmpeg Transcoding)</option>
<option value="Client">Tylko Klient (CSS Clip w Jellyfin Web)</option> <option value="Client">Client Only (CSS Clip in Jellyfin Web)</option>
<option value="Both">Oba (Transkodowanie lub CSS, zależy od klienta)</option> <option value="Both">Both (Transcoding or CSS, depending on client)</option>
</select> </select>
<div class="fieldDescription">Wybierz, w jaki sposób wtyczka ma usuwać pasy. Opcja serwerowa wymusza transkodowanie (obciążenie CPU/GPU), opcja kliencka jest lżejsza, ale działa tylko w przeglądarce.</div> <div class="fieldDescription">Choose how the plugin should remove black bars. Server option forces transcoding (CPU/GPU load), Client option is lightweight but only works in web browsers.</div>
</div> </div>
<div> <div>
<button is="emby-button" type="submit" class="raised button-submit block emby-button"> <button is="emby-button" type="submit" class="raised button-submit block emby-button">
<span>Zapisz</span> <span>Save</span>
</button> </button>
</div> </div>
</form> </form>
+5 -6
View File
@@ -55,7 +55,7 @@ namespace JellyfinPlugin
if (string.IsNullOrEmpty(webPath)) if (string.IsNullOrEmpty(webPath))
{ {
_logger.LogWarning("Nie udało się znaleźć katalogu Jellyfin Web. Ręczna instalacja skryptu klienckiego będzie wymagana."); _logger.LogWarning("Failed to find Jellyfin Web directory. Manual installation of the client script is required.");
return; return;
} }
@@ -66,23 +66,22 @@ namespace JellyfinPlugin
if (!indexContent.Contains("BlackBarRemover/ClientScript.js")) if (!indexContent.Contains("BlackBarRemover/ClientScript.js"))
{ {
// Wstrzykujemy skrypt tuż przed końcem taga </body>
indexContent = indexContent.Replace("</body>", $" {scriptTag}\n</body>"); indexContent = indexContent.Replace("</body>", $" {scriptTag}\n</body>");
File.WriteAllText(indexPath, indexContent); File.WriteAllText(indexPath, indexContent);
_logger.LogInformation("Pomyślnie wstrzyknięto skrypt BlackBarRemover do index.html w {Path}", indexPath); _logger.LogInformation("Successfully injected BlackBarRemover script into index.html at {Path}", indexPath);
} }
else else
{ {
_logger.LogInformation("Skrypt kliencki BlackBarRemover jest już wstrzyknięty w index.html"); _logger.LogInformation("BlackBarRemover client script is already injected into index.html");
} }
} }
catch (UnauthorizedAccessException) catch (UnauthorizedAccessException)
{ {
_logger.LogWarning("Brak uprawnień do modyfikacji index.html. Zmodyfikuj uprawnienia plików Jellyfin Web lub dodaj skrypt ręcznie w Custom CSS."); _logger.LogWarning("Permission denied to modify index.html. Change Jellyfin Web file permissions or add the script manually in Custom CSS.");
} }
catch (Exception ex) catch (Exception ex)
{ {
_logger.LogError(ex, "Wystąpił błąd podczas wstrzykiwania skryptu do index.html."); _logger.LogError(ex, "An error occurred while injecting the script into index.html.");
} }
} }
@@ -23,9 +23,9 @@ namespace JellyfinPlugin.Tasks
_libraryManager = libraryManager; _libraryManager = libraryManager;
} }
public string Name => "Skanuj brakujące czarne pasy (Black Bar Remover)"; public string Name => "Scan Missing Black Bars (Black Bar Remover)";
public string Key => "BlackBarRetroactiveScanTask"; public string Key => "BlackBarRetroactiveScanTask";
public string Description => "Skanuje istniejącą bibliotekę, pomijając już przeanalizowane pliki. Użyj tego po zainstalowaniu wtyczki."; public string Description => "Scans the existing library, skipping already analyzed files. Run this after installing the plugin.";
public string Category => "Library"; public string Category => "Library";
public async Task ExecuteAsync(IProgress<double> progress, CancellationToken cancellationToken) public async Task ExecuteAsync(IProgress<double> progress, CancellationToken cancellationToken)
+1 -1
View File
@@ -34,7 +34,7 @@ A Jellyfin plugin that automatically detects and removes black bars (letterboxin
- `Client`: Uses CSS injection in the web player. - `Client`: Uses CSS injection in the web player.
- `Server`: Requires setting up the FFmpeg wrapper. - `Server`: Requires setting up the FFmpeg wrapper.
- `Both`: Attempts both methods depending on the client. - `Both`: Attempts both methods depending on the client.
4. **Important for existing libraries**: The plugin automatically scans *new* files when they are added to Jellyfin. For your existing library, go to **Dashboard -> Scheduled Tasks** and run the **"Skanuj brakujące czarne pasy (Black Bar Remover)"** task manually. It will scan all existing movies and episodes in the background. 4. **Important for existing libraries**: The plugin automatically scans *new* files when they are added to Jellyfin. For your existing library, go to **Dashboard -> Scheduled Tasks** and run the **"Scan Missing Black Bars (Black Bar Remover)"** task manually. It will scan all existing movies and episodes in the background.
### Activating the Server-Side Wrapper (Automatic) ### Activating the Server-Side Wrapper (Automatic)