Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Browser-based tool for aligning two texts in different languages.

License

NotificationsYou must be signed in to change notification settings

bilinguator/b-editor

Repository files navigation

Interface of B-Editor

B-Editor

B-Editor is the browser based tool for alignment texts in two different languages.

Developed byBilinguator.com.

Contents
Getting started
Input texts requirements
Loading files
Manipulation of paragraphs
Editing paragraphs contents
Adding illustrations
Saving files
Keyboard shortcuts
Precautions

Getting started

TheB-Editor aligner has been developed and tested in Google Chrome, Yandex Browser, Edge, FireFox browsers. No third-party libraries or frameworks were used during development, exceptJQuery 3.6.0. Our stack consists of HTML, CSS, JavaScript, PHP. We used XAMPP with PHP version 7.4.29 for development.

Put the repository contents to your web server and openindex.php file in browser.

Input texts requirements

Texts must meet the requirements of thespecification.

The following scheme of naming your files is highly recommended:

<BOOK_ID>_<LANG>.txt, where

  • <BOOK_ID> is a unique identifier of your book;
  • <LANG> - ISO code of the language. This part of the file name determines the size and direction of the texts (left-to-right or right-to-left).

Loading files

Put your files to be aligned in thebooks directory. Launch B-Editor, choose two files in the header and press theLaunch button (“Play” button-like triangleLaunch button) in the top right corner. Then, the paragraphs of the two chosen texts are uploaded.

Header of B-Editor

Manipulation of paragraphs

Adding new empty paragraph

Each paragraph has the plus button (Add button) on its side. Clicking it, you can add a new empty paragraph to the current place. Current paragraph and all below will be shifted down.

Deleting current paragraph

To delete a paragraph, click the diagonal cross (Delete button) on its side. All the paragraphs below will be shifted up.

Paragraphs’ indexes

Each paragraph is marked with an index. When clicking an index of a left paragraph, it appears in the upper textarea of toolbar; click a right paragraph’s index, it to appear in the lower textarea (Delete button). It is also possible to change the textareas’ values manually. These indexes are useful in the following manipulations.

Setting bookmark

The bookmark is one index corresponding to a paragraphs couple. To set a bookmark, click to the index of the left paragraph of the current couple or type it to the upper textarea in the toolbar. Click the Bookmark button (Bookmark button) to set the bookmark. The bookmark index is saved to thebooks/bookmarks folder named asbookmark_<BOOK_ID>_<LANG1>_<LANG2>.<BOOK1_EXTENSION>. While the file exists, the bookmark is set all the time of using B-Editor, and it is displayed on the right side of the toolbar asbookmark/total paragraphs count ratio (Progress ratio).

Moving focus to a paragraph

Click thebookmark part of thebookmark/total paragraphs count ratio to move to the bookmarked paragraph.

To move to any other paragraph, type the index of the paragraph in the upper textarea and click theTo current position button (To current position button). Look at the progress bar to orient (Progress bar).

Shifting paragraphs

To shift two paragraphs of different sides to make them adjacent, choose them and click theShift button (Shift button).

Deleting paragraph couples by indexes

To delete several paragraphs on both sides, enter the ‘from’ and ‘to’ indexes to the textareas. Click theDelete button (Delete button). Paragraph couples starting from the minimal entered index to the maximal index will be deleted. All the paragraphs below will be shifted up.

Dividing paragraphs

To divide a paragraph into two, click the position in its content wherein the paragraph must be divided. Press theDivide paragraph button (Divide paragraph button).

To divide a paragraph into several paragraphs, add newline symbols, wherein the paragraph must be divided. Press theDivide paragraph by newline button (Divide paragraph button).

Concatenating paragraphs

To concatenate two following paragraphs of one side, click on the first of it in any place. Press theConcatenate paragraphs button (Concatenate paragraphs button). The two paragraphs will be merged via empty string. To concatenate two paragraphs via space character or<delimiter> pressConcatenate paragraphs via space (Concatenate paragraphs via space button) orConcatenate paragraphs via delimiter (Concatenate paragraphs via delimiter button) button respectively.

Editing paragraphs contents

Adding tags

Select text in a paragraph. PressTitle (Title button),Bold (Bold button) orItalic (Italic button) button to tag the selected text with<h1></h1>,<b></b> or<i></i> respectively.

Adding delimiter

Click on the position in a paragraph. Press theAdd delimiter button (Add delimiter button).

Switching case

Select a text and press theSwitch case (Switch case) to change the case from upper to lower and vice versa.

Adding illustrations

Put your PNG illustrations to thebooks/illustrations folder. Name them as natural arabiс numbers starting from 1 likehere.

To add a new illustration to the book, create a new empty paragraph, click on it and pressAdd illustration button (Add illustration button). The<imgℕ> tag will be inserted, where ℕ is the natural Arabic number. The<img1> corresponds to thebooks/illustrations/1.png file.

Saving files

Saving source texts

To save two separate source files aligned, click theSave source files button (Save source files) or pressCtrl+S keys.

Saving bilingual TXT, FB2 and EPUB books

Clone the git repository ofBilingual formats to the root directory of B-Editor. After the next launch of B-Editor, new buttons will appear:

ButtonAction
Save txtSave TXT
Save fb2Save FB2
Save epubSave EPUB

All the books are saved to thebooks/saved folder.

Printing bilingual PDF

Clone the git repository ofPrint Bilingual PDF to the root directory of B-Editor. After the next launch of B-Editor, new buttons will appear:

ButtonAction
Save txtPrint columns PDF
Save fb2Print rows PDF

If bothBilingual formats andPrint Bilingual PDF are in the B-Editor root directory, theSave in all formats button (Save in all formats) appears. Press it to save your bilingual book in TXT, FB2, EPUB formats and print the PDF in columns and rows.

Keyboard shortcuts

KeysButtonAction
Ctrl+SSave source filesSave source files
Ctrl+PSave txtPrint columns PDF
Ctrl+Shift+PSave fb2Print rows PDF
Ctrl+HTitle buttonTitle
Ctrl+BBold buttonBold (when text in paragraph selected)
Ctrl+IItalic buttonItalic
Ctrl+,Add delimiter buttonAdd delimiter
Ctrl+LAdd illustration buttonAdd illustration
Ctrl+DDivide paragraph buttonDivide paragraph
Ctrl+Shift +DDivide paragraph buttonDivide paragraph by newlines
Ctrl+MConcatenate paragraphs buttonConcatenate paragraphs
Ctrl+UConcatenate paragraphs via space buttonConcatenate paragraphs via space
Ctrl+YConcatenate paragraphs via delimiter buttonConcatenate paragraphs via delimiter
Ctrl+OTo current position buttonTo current position
Ctrl+BBookmark buttonSet bookmark (when no text in paragraph selected)

Precautions

B-Editor does not suit for working with big texts. When working with texts with more than a thousand paragraphs, the waiting time for some operations can be quite long.

About

Browser-based tool for aligning two texts in different languages.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors2

  •  
  •  

[8]ページ先頭

©2009-2026 Movatter.jp