Diaco Soltanpour 791a39697a Localize print queue badges and use گالن in Persian (#5)
## Summary
- Translate print-queue badges (canisters/boxes/pages/pending) via i18n
- Replace Persian قوطی with گالن everywhere in UI strings

## Test plan
- [ ] Print Queue in FA shows e.g. `20 گالن | 5 کارتن` and `7 صفحه`
- [ ] Pending badge shows `در انتظار`
- [ ] Entry form FA labels use گالن (weight / per box)

Reviewed-on: #5
Co-authored-by: Diaco Soltanpour <dyaco8464@yahoo.com>
Co-committed-by: Diaco Soltanpour <dyaco8464@yahoo.com>
2026-10-01 18:41:27 +00:00
2026-09-30 14:17:30 +03:30

Lithium Label Manager

A self-hosted web application for tracking production orders and generating pixel-perfect labels for canisters and boxes.

Features

  • Fast Data Entry: Instantly calculate the required number of canister and box labels based on total order weight.
  • Dynamic Print Layouts: Automatically generate print-ready A4 pages correctly formatted for pre-printed sticker sheets.
  • Print Queue: Manage and track pending label batches with real-time updates.
  • Bilingual Interface: Seamlessly switch between English and Persian (LTR).

🚀 Installation & Deployment

The application is fully containerized using Docker, meaning it can be deployed on any machine with Docker installed.

Prerequisites

  1. Install Docker Desktop (Windows/Mac) or Docker Engine (Linux).
  2. Ensure you have the project source code downloaded and extracted.

Starting the Server

  1. Open a terminal or command prompt and navigate to the project directory:
    cd path/to/product-slip
    
  2. Start the application stack using Docker Compose:
    docker compose up -d --build
    
  3. The server is now running! You can access the application from any device on the same local network:
    • If you are on the same machine: Open your browser and go to http://localhost
    • If you are on a different machine on the same network: Find the host computer's local IP address (e.g., 192.168.1.15) and go to http://192.168.1.15

Stopping the Server

To safely stop the application without losing data:

docker compose down

(Note: Your database is stored safely in the ./data folder and will persist between restarts).


🖨️ Printer Calibration Guide

Because the application prints dynamic text directly over your physical, pre-printed A4 label sheets, the printer's alignment must be exact. Different browsers and physical printers feed paper with slight millimeter variances.

Follow these steps to calibrate the alignment for your specific printer:

1. Print the Calibration Sheet

  1. Open the application and navigate to the Calibrate tab in the top menu.
  2. Load a blank piece of A4 paper into your printer.
  3. Click the "Print Calibration Sheet" button to print it out.

2. Check the Alignment

  1. Take your printed blank calibration sheet.
  2. Place it perfectly behind one of your actual pre-printed label sheets.
  3. Hold them both up to a light source (like a window or lamp).
  4. Look for the crosshairs (┼). They should align perfectly inside the target boxes (Batch, Date, Next Control, and Weight).

3. Adjusting the Millimeters (If Necessary)

If the text is printing slightly too high, too low, or too far to a side, you can adjust the CSS margins in the codebase to shift the text.

  1. Open the file: slips/templates/slips/print_page.html
  2. Scroll to the <style> block at the top, and find the .var-field CSS section.
  3. You will see absolute positioning values in millimeters (mm), for example:
    .val-batch { top: 15mm; left: 40mm; }
    
  4. Adjust the numbers:
    • To move text DOWN: Increase the top value (e.g., 15mm -> 17mm).
    • To move text RIGHT: Increase the left value (e.g., 40mm -> 42mm).
  5. Save the file.
  6. Restart the Docker container so the changes take effect:
    docker compose restart app
    
  7. Print a new calibration sheet and test again until perfect!
Description
No description provided
Readme 775 KiB
Languages
JavaScript 32.2%
Python 31.3%
HTML 23.9%
CSS 11.7%
Dockerfile 0.9%