Skip to content

Commit

Permalink
fix: set 'en' as the default locale
Browse files Browse the repository at this point in the history
  • Loading branch information
SlayerOrnstein committed Sep 11, 2024
1 parent 574470a commit 522f3b4
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 15 deletions.
8 changes: 4 additions & 4 deletions src/ArchonCrystal.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ export default class ArchonCrystal {
/**
*
* @param {Object} crystal The archon crystal object
* @param {string} local The locale to get translations in
* @param {string} locale The locale to get translations in
*/
constructor(crystal, local) {
constructor(crystal, locale = 'en') {
/**
* Archon shard color
* @type {String}
*/
this.color = archonShardColor(crystal.Color, local);
this.color = archonShardColor(crystal.Color, locale);

/**
* Archon shard modifier
* @type {String}
*/
this.modifier = archonShardUpgradeType(crystal.Color, crystal.UpgradeType, local);
this.modifier = archonShardUpgradeType(crystal.Color, crystal.UpgradeType, locale);
}
}
2 changes: 1 addition & 1 deletion src/Mission.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default class Mission {
* @param {Object} mission The mission data
* @param {string} locale The locale to return in
*/
constructor(mission, locale) {
constructor(mission, locale = 'en') {
const uniqueName = mission.type || mission.Tag;

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Profile.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default class Profile {
* @param {Object} profile The profile data to parse
* @param {string} locale The locale to return in where possible
*/
constructor(profile, locale) {
constructor(profile, locale = 'en') {
/**
* Player's acount ID
* @type {Stirng}
Expand Down
2 changes: 1 addition & 1 deletion src/ProfileParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default class ProfileParser {
* @param {Object} data The data returned by getProfile endpoint
* @param {string} locale The locale to return where possible
*/
constructor(data, locale) {
constructor(data, locale = 'en') {
/**
* Player's profile
* @type {Profile}
Expand Down
2 changes: 1 addition & 1 deletion src/Syndicate.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default class Syndicate {
* @param {Object} affiliation The syndicate data
* @param {string} locale locale code
*/
constructor(affiliation, locale) {
constructor(affiliation, locale = 'en') {
// TODO: name is readable but still might want to clean them up
// i.e "NewLokaSyndicate" can be "New Loka"" instead

Expand Down
2 changes: 1 addition & 1 deletion test/unit/archonCrystal.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ describe('ArchonShard', () => {
UpgradeType: '/Lotus/Upgrades/Invigorations/ArchonCrystalUpgrades/ArchonCrystalUpgradeWarframeArmourMaxMythic',
};

const shard = new ArchonCrystal(shardData, 'en');
const shard = new ArchonCrystal(shardData);

assert.strictEqual(shard.color, 'Tauforged Azure');
assert.strictEqual(shard.modifier, '+225 Armor');
Expand Down
2 changes: 1 addition & 1 deletion test/unit/mission.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe('Mission', () => {
type: 'SolNode35',
};

const mission = new Mission(data, 'en');
const mission = new Mission(data);

assert.strictEqual(mission.node, 'Arcadia (Mars)');
assert.strictEqual(mission.nodeKey, data.type);
Expand Down
4 changes: 2 additions & 2 deletions test/unit/mock.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ describe('Mock ProfileParser', () => {
it('should handle real data', function () {
this.timeout(20000);

assert.isOk(new ProfileParser(ornstein, 'en'));
assert.isOk(new ProfileParser(tobiah, 'en'));
assert.isOk(new ProfileParser(ornstein));
assert.isOk(new ProfileParser(tobiah));
});
});
});
4 changes: 2 additions & 2 deletions test/unit/stats.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ describe('Mock ProfileParser', () => {
it('should handle real data', function () {
this.timeout(10000);

assert.isOk(new Stats(ornstein.Stats, 'en'));
assert.isOk(new Stats(tobiah.Stats, 'en'));
assert.isOk(new Stats(ornstein.Stats));
assert.isOk(new Stats(tobiah.Stats));
});
});
});
2 changes: 1 addition & 1 deletion test/unit/xpinfo.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ describe('XpInfo', () => {
XP: 785691,
};

const xp = new XpInfo(data, 'en');
const xp = new XpInfo(data);

assert.strictEqual(xp.uniqueName, '/Lotus/Weapons/Grineer/LongGuns/GrineerAssaultRifle/TwinGrakatas');
assert.strictEqual(xp.item.name, 'Twin Grakatas');
Expand Down

0 comments on commit 522f3b4

Please sign in to comment.