Skip to content

Commit

Permalink
Merge pull request #578 from eb1/master
Browse files Browse the repository at this point in the history
Fix #577. This is for patch 1.16.3.
  • Loading branch information
eb1 authored Jun 5, 2024
2 parents 5bd3129 + 2d401b7 commit 419b9c5
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion config.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<widget android-versionCode="54" defaultlocale="en" id="org.adaptit.adaptitmobile" ios-CFBundleVersion="1" version="1.16.2" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0" xmlns:gap="http://phonegap.com/ns/1.0">
<widget android-versionCode="55" defaultlocale="en" id="org.adaptit.adaptitmobile" ios-CFBundleVersion="1" version="1.16.3" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0" xmlns:gap="http://phonegap.com/ns/1.0">
<name short="Adapt It Mobile" xml:lang="en">Adapt It Mobile</name>
<description xml:lang="en">
An open source application for translating between related languages.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "adapt-it-mobile",
"version": "1.16.2",
"version": "1.16.3",
"description": "Adapt It Mobile",
"repository": {
"type": "git",
Expand Down
4 changes: 2 additions & 2 deletions www/js/Application.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ define(function (require) {
searchIndex: 0,
currentProject: null,
localURLs: [],
version: "1.16.2", // appended with Android / iOS build info
AndroidBuild: "54", // (was milestone release #)
version: "1.16.3", // appended with Android / iOS build info
AndroidBuild: "55", // (was milestone release #)
iOSBuild: "1", // iOS uploaded build number for this release (increments from 1 for each release)
importingURL: "", // for other apps in Android-land sending us files to import

Expand Down
44 changes: 22 additions & 22 deletions www/js/views/ProjectViews.js
Original file line number Diff line number Diff line change
Expand Up @@ -714,13 +714,13 @@ define(function (require) {
if (data.attributes.localname) {
return data.attributes.localname;
}
if (data.attributes.localnames) {
if (data.attributes.localnames && data.attributes.localnames.length > 0) {
return data.attributes.localnames[0];
}
if (data.attributes.names) {
return data.attributes.names[0];
if (data.attributes.name) {
return data.attributes.name;
}
return data.attributes.name;
return data.attributes.names[0];
},
source: this.languageMatches(this.theLangs),
limit: 200,
Expand Down Expand Up @@ -793,13 +793,13 @@ define(function (require) {
if (data.attributes.localname) {
return data.attributes.localname;
}
if (data.attributes.localnames) {
if (data.attributes.localnames && data.attributes.localnames.length > 0) {
return data.attributes.localnames[0];
}
if (data.attributes.names) {
return data.attributes.names[0];
if (data.attributes.name) {
return data.attributes.name;
}
return data.attributes.name;
return data.attributes.names[0];
},
source: this.languageMatches(this.theLangs),
limit: 200,
Expand Down Expand Up @@ -1198,9 +1198,9 @@ define(function (require) {
// try autonym, fall back on language name in English
if (firstLang.attributes.localname) {
currentView.langName = firstLang.attributes.localname;
} else if (firstLang.attributes.localnames) {
} else if (firstLang.attributes.localnames && firstLang.attributes.localnames.length > 0) {
currentView.langName = firstLang.attributes.localnames[0];
} else if (firstLang.attributes.names) {
} else if (firstLang.attributes.names && firstLang.attributes.names.length > 0) {
currentView.langName = firstLang.attributes.names[0];
} else {
currentView.langName = firstLang.attributes.name;
Expand All @@ -1220,12 +1220,12 @@ define(function (require) {
// try autonym, fall back on language name in English
if (suggestion.attributes.localname) {
currentView.langName = suggestion.attributes.localname;
} else if (suggestion.attributes.localnames) {
} else if (suggestion.attributes.localnames && suggestion.attributes.localnames.length > 0) {
currentView.langName = suggestion.attributes.localnames[0];
} else if (suggestion.attributes.names) {
currentView.langName = suggestion.attributes.names[0];
} else {
} else if (suggestion.attributes.name) {
currentView.langName = suggestion.attributes.name;
} else {
currentView.langName = suggestion.attributes.names[0];
}
newLangCode = suggestion.attributes.tag;
currentView.langCode = buildFullLanguageCode(newLangCode, $('#LanguageVariant').val().trim().replace(/\s+/g, ''));
Expand Down Expand Up @@ -1697,9 +1697,9 @@ define(function (require) {
// try autonym, fall back on language name in English
if (firstLang.attributes.localname) {
currentView.langName = firstLang.attributes.localname;
} else if (firstLang.attributes.localnames) {
} else if (firstLang.attributes.localnames && firstLang.attributes.localnames.length > 0) {
currentView.langName = firstLang.attributes.localnames[0];
} else if (firstLang.attributes.names) {
} else if (firstLang.attributes.names && firstLang.attributes.names.length > 0) {
currentView.langName = firstLang.attributes.names[0];
} else {
currentView.langName = firstLang.attributes.name;
Expand All @@ -1719,12 +1719,12 @@ define(function (require) {
// try autonym, fall back on language name in English
if (suggestion.attributes.localname) {
currentView.langName = suggestion.attributes.localname;
} else if (suggestion.attributes.localnames) {
} else if (suggestion.attributes.localnames && suggestion.attributes.localnames.length > 0) {
currentView.langName = suggestion.attributes.localnames[0];
} else if (suggestion.attributes.names) {
currentView.langName = suggestion.attributes.names[0];
} else {
} else if (suggestion.attributes.name) {
currentView.langName = suggestion.attributes.name;
} else {
currentView.langName = suggestion.attributes.names[0];
}
newLangCode = suggestion.attributes.tag;
currentView.langCode = buildFullLanguageCode(newLangCode, $('#LanguageVariant').val().trim().replace(/\s+/g, ''));
Expand Down Expand Up @@ -1918,9 +1918,9 @@ define(function (require) {
// try autonym, fall back on language name in English
if (firstLang.attributes.localname) {
strLangName = firstLang.attributes.localname;
} else if (firstLang.attributes.localnames) {
} else if (firstLang.attributes.localnames && firstLang.attributes.localnames.length > 0) {
strLangName = firstLang.attributes.localnames[0];
} else if (firstLang.attributes.names) {
} else if (firstLang.attributes.names && firstLang.attributes.names.length > 0) {
strLangName = firstLang.attributes.names[0];
} else {
strLangName = firstLang.attributes.name;
Expand Down

0 comments on commit 419b9c5

Please sign in to comment.