Skip to content

Commit

Permalink
Merge pull request #462 from lazmeister/language_and_variables_fix
Browse files Browse the repository at this point in the history
Language and variables fix
  • Loading branch information
werthdavid authored Feb 6, 2022
2 parents 8e82cde + ac99080 commit 226a30b
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion projects/zxing-scanner/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@zxing/ngx-scanner",
"version": "3.4.0",
"version": "3.4.1",
"description": "High-performance Angular 8 barcode scanner component based on ZXing.",
"homepage": "https://github.com/zxing-js/ngx-scanner#readme",
"private": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export class BrowserMultiFormatContinuousReader extends BrowserMultiFormatReader

/**
* Allows to call scanner controls API while scanning.
* Will be undefined if no scanning is runnig.
* Will be undefined if no scanning is running.
*/
protected scannerControls: IScannerControls;

Expand Down
38 changes: 19 additions & 19 deletions projects/zxing-scanner/src/lib/zxing-scanner.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,61 +117,61 @@ export class ZXingScannerComponent implements OnInit, OnDestroy {
autostart: boolean;

/**
* How the preview element shoud be fit inside the :host container.
* How the preview element should be fit inside the :host container.
*/
@Input()
previewFitMode: 'fill' | 'contain' | 'cover' | 'scale-down' | 'none' = 'cover';

/**
* Emitts events when the torch compatibility is changed.
* Emits events when the torch compatibility is changed.
*/
@Output()
torchCompatible: EventEmitter<boolean>;

/**
* Emitts events when a scan is successful performed, will inject the string value of the QR-code to the callback.
* Emits events when a scan is successful performed, will inject the string value of the QR-code to the callback.
*/
@Output()
scanSuccess: EventEmitter<string>;

/**
* Emitts events when a scan fails without errors, usefull to know how much scan tries where made.
* Emits events when a scan fails without errors, useful to know how much scan tries where made.
*/
@Output()
scanFailure: EventEmitter<Exception | undefined>;

/**
* Emitts events when a scan throws some error, will inject the error to the callback.
* Emits events when a scan throws some error, will inject the error to the callback.
*/
@Output()
scanError: EventEmitter<Error>;

/**
* Emitts events when a scan is performed, will inject the Result value of the QR-code scan (if available) to the callback.
* Emits events when a scan is performed, will inject the Result value of the QR-code scan (if available) to the callback.
*/
@Output()
scanComplete: EventEmitter<Result>;

/**
* Emitts events when no cameras are found, will inject an exception (if available) to the callback.
* Emits events when no cameras are found, will inject an exception (if available) to the callback.
*/
@Output()
camerasFound: EventEmitter<MediaDeviceInfo[]>;

/**
* Emitts events when no cameras are found, will inject an exception (if available) to the callback.
* Emits events when no cameras are found, will inject an exception (if available) to the callback.
*/
@Output()
camerasNotFound: EventEmitter<any>;

/**
* Emitts events when the users answers for permission.
* Emits events when the users answers for permission.
*/
@Output()
permissionResponse: EventEmitter<boolean>;

/**
* Emitts events when has devices status is update.
* Emits events when has devices status is update.
*/
@Output()
hasDevices: EventEmitter<boolean>;
Expand All @@ -195,7 +195,7 @@ export class ZXingScannerComponent implements OnInit, OnDestroy {

if (!this._ready) {
this._devicePreStart = device;
// let's ignore silently, users don't liek logs
// let's ignore silently, users don't like logs
return;
}

Expand Down Expand Up @@ -231,7 +231,7 @@ export class ZXingScannerComponent implements OnInit, OnDestroy {
deviceChange: EventEmitter<MediaDeviceInfo>;

/**
* User device acessor.
* User device accessor.
*/
get device() {
return this._device;
Expand Down Expand Up @@ -412,7 +412,7 @@ export class ZXingScannerComponent implements OnInit, OnDestroy {
}

/**
* Gets and registers all cammeras.
* Gets and registers all cameras.
*/
async askForPermission(): Promise<boolean> {

Expand Down Expand Up @@ -478,7 +478,7 @@ export class ZXingScannerComponent implements OnInit, OnDestroy {
return;
}

// configurates the component and starts the scanner
// configures the component and starts the scanner
await this.initAutostartOn();

this._ready = true;
Expand Down Expand Up @@ -568,7 +568,7 @@ export class ZXingScannerComponent implements OnInit, OnDestroy {
public scanStart() {

if (this._scanSubscription) {
throw new Error('There is already a scan proccess running.');
throw new Error('There is already a scan process running.');
}

if (!this._device) {
Expand All @@ -582,7 +582,7 @@ export class ZXingScannerComponent implements OnInit, OnDestroy {
* Stops old `codeReader` and starts scanning in a new one.
*/
restart(): void {
// @note apenas necessario por enquanto causa da Torch
// note only necessary for now because of the Torch
this._codeReader = undefined;

const prevDevice = this._reset();
Expand All @@ -608,7 +608,7 @@ export class ZXingScannerComponent implements OnInit, OnDestroy {
this.camerasFound.next([...devices]);

if (!hasDevices) {
this.camerasNotFound.next();
this.camerasNotFound.next(null);
}

return devices;
Expand Down Expand Up @@ -750,7 +750,7 @@ export class ZXingScannerComponent implements OnInit, OnDestroy {
}

/**
* Retorna um code reader, cria um se nenhume existe.
* Return a code reader, create one if non exist
*/
private getCodeReader(): BrowserMultiFormatContinuousReader {

Expand Down Expand Up @@ -869,7 +869,7 @@ export class ZXingScannerComponent implements OnInit, OnDestroy {
}

/**
* Sets the permission value and emmits the event.
* Sets the permission value and emits the event.
*/
private setPermission(hasPermission: boolean | null): void {
this.hasPermission = hasPermission;
Expand Down

0 comments on commit 226a30b

Please sign in to comment.